I've noticed that you can only call a WCF service from Silverlight asynchronously. This seems to be a pretty sound practice, especially when deploying over the internet, but I'm wondering why this restriction has been placed on the architecture. Is it purely to enforce good practice, or are there technical reasons for this?
Essentially it's because Silverlight runs on the Browser Window UI Thread. Which means that if Silverlight is synchronously waiting for a reply - the whole browser window is non-responsive at that time.
Additionally, Silverlight originally (Silverlight 2) only had a Client Browser Communication stack.
Which means, that all communication in Silverlight was routed through the browser.
Browsers don't support synchronous programming models for communication.
That's less of a problem with the Silverlight 3+ Non-Browser Client communication stack, but it still makes sense to keep that programming model in place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With