BUILD conference–day 2

Today was the day of Windows 8 Server and of the Windows runtime (WinRT).

WinRT is the new layer providing a language neutral interface to the underlying operating system. It is written in C++ and consists of purely native code. For me it seems to be the revival of the dinosaurs since WinRT basically is a collection of COM objects. Hello IUnknown, nice to meet you again!

C++ developers must feel like in paradise. This old language celebrates a true revival during this conference and with the advent of Windows 8. It seems awkward to me that a language that is not really object oriented in its roots, still can play such an important role. I ask myself why did the project “Singularity” of Microsoft, which had (amongst others) the goal to create an OS which consists purely of managed code – except for a very very limited set of low level functionality, which had to be implemented in native code – not drive Microsoft towards a more managed Windows OS. Why do we still need to rely on COM which is a very old and outdated concept?

On the positive side we can acknowledge that WinRT provides meta information in the same format as the .NET type meta information. As a consequence this API can be accessed from C#, VB.NET and JavaScript in a very natural way. To an e.g. C# developer components of WinRT look 100% alike true managed objects. The availability of this meta data allows Visual Studio to provide true intellisense for all of these components.

Another positive aspect of WinRT is that all functions that take more than 15 milliseconds are now executed asynchronously. This helps to achieve the goal to make all Metro type applications execute “fast an fluid”. From C# (and .NET 4.5) it is very easy to access such asynchronous functions since the compiler provides the concept of async and await. With these two new keywords we can write fully asynchronous code in a way as if everything was sequential.

JavaScript introduces the concept of promises to deal with asynchronous calls. This concept makes it very easy to create applications that remain responsive even if long running functions are called.

There is one positive change that the Windows team did to COM to avoid unnecessary race conditions when calling asynchronous functions of WinRT. In Windows 8 no method of a COM object is executed as long any other method of the same instance is still pending. Sweet!

Related Articles:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Gabriel Schenker

Gabriel N. Schenker started his career as a physicist. Following his passion and interest in stars and the universe he chose to write his Ph.D. thesis in astrophysics. Soon after this he dedicated all his time to his second passion, writing and architecting software. Gabriel has since been working for over 20 years as a consultant, software architect, trainer, and mentor mainly on the .NET platform. He is currently working as principal software architect at ClearMeasure Inc. in Austin, Texas. Gabriel is passionate about software development and tries to make the life of developers easier by providing guidelines and frameworks to reduce friction in the software development process. Gabriel is married and father of four children and during his spare time likes hiking in the mountains, cooking and reading.
This entry was posted in BUILD, Conference, Windows. Bookmark the permalink. Follow any comments here with the RSS feed for this post.