Asynchronous vs. Synchronous Programming
Anders Hejlsberg at the PDC10
I really wish I’d managed to go to the Microsoft Professional Developer Conference this year. Luckily a lot of the sessions were recorded.
In this video Anders Hejlsberg, the godfather of C# and all things .NET, gives a concise history lesson of the .NET platform, followed by a look at some of the new things C# and VB.NET have in store for asynchronous programming techniques.
Asynchronous techniques are becoming more and more commonplace – JavaScript, Silverlight and many other platforms are starting to gain async-only APIs for some of their functionality.
One example that’s close to my heart is the SharePoint 2010 Client Object Model. This comes in three flavours – .NET, Silverlight and JavaScript. Although the .NET and Silverlight ones support both synchronous and asynchronous, it’s a good idea in most scenarios to forget about the synchronous methods. In fact, the beta of the Silverlight version of the API, only had asynchronous exec methods. After all, what’s the point of going to the trouble of using responsive, client-side technologies like Sliverlight or JavaScript, and then writing synchronous code that blocks the UI?
Asynchronous methods are also worthwhile on server-side code. Clever usage can mean that server response threads are able to deal with more incoming requests.
