Synchronous Web Service Calls in Silverlight

There seem to be a lot of strong opinions about the absence of Synchronous Web Service calls in the Beta 1 release of Silverlight 2, so I thought I would try and condense the points brought forward by the two opposing forces into an easily digestible format.

Camp 1: Synchronous Web Service calls are missing and rightly so!

  • Synchronous calls will block the web browser's UI thread, rendering the browser unresponsive.
  • Microsoft did this to prevent developers from....<<insert self-mutilation saying here>>.
  • Microsoft did this to protect Silverlight platform from getting a bad rap.
  • Microsoft did this because of cross-platform limitations.
  • Flash Web Service calls are asynchronous.
  • Synchronous calls are dangerous because you are depending on receiving a response that might not happen.
  • Synchronous calls are easier to make and therefore easier to abuse.

Camp 2: Synchronous Web Service calls are missing and you have ruined my life!

  • Asynchronous calls are causing my code to be difficult to read and maintain.
  • If I want to ....<<insert self-mutilation saying here> then I should be able to do it.
  • Most web service calls are short-lived and aren't transferring gobs of information.
  • At least support background threads and let us call synchronously there.
  • At least provide a way to simulate synchronous behavior.


Hopefully, Microsoft will come up with a good compromise to satisfy both camps!


Feedback

# re: Synchronous Web Service Calls in Silverlight

Gravatar The only "compromising" that needs to be done is that each Camp respects the other's viewpoint. The two approaches can co-exist alongside each other readily and without any real interference between them so from a technical perspective not much true "compromise" is required. I see a lot of parallels with religion here.

Camp 1 already has asynchronous calls so they are good to go.

Camp 2 has no such facility (synchronous). And Silverlight makes it virtually impossible to implement such a facility, short of very hacky loop constructs.

Camp 1 should stop evangelising about Async (ie. pushing their religion) when it is relatively clear that both approaches have value within an application. 5/28/2008 1:23 AM | Kevmeister

Comments have been closed on this topic.