Saturday 24 December 2011

Windows RunTime–Windows 8

 

With the launch of Windows 8 comes a new disruption for developer they call it the Windows RunTime(WRT). A decade ago we worked on Win 32 API as years progressed .NET came in & with it came a host of easier language C# , VB.NET.  Microsoft has continued to keep Win 32 API usable via .NET via P/Invoke and some directly via .NET with additional supportability.

There has been an oblivious thought process to keep Win 32 alive since its early days till now & reason to , Architecturally speaking the paradigm shift to richer UI with slate, tablet as next gen users, it was poised to look at something new faster using Win 32 native system via inbuilt plumbing for the .NET user enabling them to build Metro Style Application.

The need of the hour has been to simplify Win 32 layer to introducing WRT layer simplified and can be used by C#, VB.NET developer.

To know more about WRT refer to these session

 

Key Take away

1) It is not based on .NET, only exposed to it (a bit like COM interop, but much more seamless... e.g. no interop assemblies)..

2) At the lowest level, WinRT is an object model defined on ABI level. It uses COM as a base (so every WinRT object implements IUnknown and does refcounting), and builds from there. It does add quite a lot of new concepts in comparison to COM of old, most of which come directly from .NET - for example, WinRT object model has delegates, and events are done .NET-style (with delegates and add/remove subscriber methods, one per event) rather than the old COM model of event sources and sinks. Of other notable things, WinRT also has parametrized ("generic") interfaces.

3)One other big change is that all WinRT components have metadata available for them, just like .NET assemblies. In COM you kinda sorta had that with typelibs, but not every COM component had them. For WinRT, the metadata is contained in .winmd files - look inside "C:\Program Files (x86)\Windows Kits\8.0\Windows Metadata\" in Developer Preview. If you poke around, you'll see that they are actually CLI assemblies with no code, just metadata tables. You can open them with ILDASM, in fact. Note, this doesn't mean that WinRT itself is managed - it simply reuses the file format.

4) Does WRT interact with CLR – No Something which I am not sure still hunting answers but my hunch is no.

Couple of other important links

From the looks of WRT its likely to future programming considering the form factor is the slate & the tablet, I’m quite sure the WPF to build the Metro Style UI would be sucking on performance big time so the brain wave why don’t we rewire & use com with win 32 to do the same job.

How long does this idea go well with the developers is shaky.

No comments: