Keep ASync in mind and you are doing fine

Keep ASync in mind and you are doing fine

Old forum URL: forums.lhotka.net/forums/t/7168.aspx


rfcdejong posted on Thursday, June 25, 2009

I'll have to convince our developers to make another mind switch, most of them are used to call functi(methods) which result an value in sync, they wait for a value to be returned. Since i showed the Silverlight & Moonlight power to my 'superiors' we turned that way, i learned alot about silverlight in the past days and i'm all positive.

Even in windows i like the ASync thinking so much better for the user experience, no hanging screens etc. But people see a risk in that, that it might be unsafe and Sync calls are just easier. Also easier debugging, i didn't see enough reasons to even bother convincing people. Now Silverlight "demands" it i already love Silverlight ;)

I'm not alone in loving Silverlight!

Peter Blomberg
http://petesbloggerama.blogspot.com/2008/07/omg-silverlight-asynchronous-is-evil.html

Drazen Dotlic
http://drazen.dotlic.name/weblog/post/2008/05/09/Silverlight-2-forcing-developers-to-learn-asynchronous-techniques.aspx

RockfordLhotka replied on Thursday, June 25, 2009

You and me both!! :)

skagen00 replied on Thursday, June 25, 2009

It certainly does require an extra little dimension to thinking...

What is a little cumbersome at times is dealing with Silverlight's reactions to the asynchronous data. For example, if I have a name value list that fetches and the result comes back after my datacontext has been set, it doesn't reflect my selection for the bound property. (There are workarounds & such).

Overall it's a model I've gotten more comfortable with too - code cleanliness and readability can be kept up IMO by handling asynch in manners like this:

IndividualLookup.Exists(15, delegate (object sender, DataPortalResult e) { -- handle result here -- });

And it's easy to actually nest this sort of behavior too when needed.

I think given the choice between WPF and Silverlight, the tooling maturity makes it a legitimate debate to me depending on the application, but between ASP.Net and Silverlight when it's not "customer-customer" facing it's hard for me to see a case where I'd want to use ASP.Net in the scenarios I run across. I feel so incredibly more productive w/ Silverlight.

So sad, my JavaScript skills are wasting away :)

Copyright (c) Marimer LLC