Posts Tagged‘object oriented’

WinRT

Windows 8 and WinRT: On the Cusp of Platform Unification.

Last week saw the much talked about Microsoft BUILD conference take place, the one for which all us developers tentatively held our breath wondering what the future of the Microsoft platform would be. Since then there’s been a veritable war chest of information that’s come from the conference and I unfortunately didn’t get the time to cover it last week (thanks mostly to my jet setting ways). Still not writing about it right away has given me some time to digest the flood of information and speculation that this conference has brought us and I personally believe that Windows 8 is nothing but good news for developers, even those who thought it would lead to the death of their ecosystem.

For starters the project codenamed Jupiter has an official name of Windows Run Time (WinRT) and looks to be an outright replacement for the Win32 API that’s been around since 1993. The big shift here is that whilst Win32 was designed for a world of C programmers WinRT will instead be far more object-oriented, aimed more directly at the C++ world. WinRT applications will also use the XAML framework for their user interfaces and will compile to native x86 code rather than to .NET bytecode like they currently do. WinRT applications also do away with the idea of dialog boxes, removing the notion of modal applications completely (at least, in the native API). This coupled with the fact that any API that takes longer than 50ms to respond being asynchronous means that Metro apps are inherently more responsive, something that current x86 desktop apps can’t guarantee. Additionally should an app be designed for the Metro styled interface it must only use the WinRT libraries for the interface, you can’t have mixed Metro/Classic applications.

If you’re after an in-depth breakdown of what WinRT means for developers Miguel de Icaza (of Mono fame) has a great breakdown here.

WinRT will also not be a universal platform on which will provide backwards compatibility for all current Windows applications. It’s long been known that Windows 8 will be able to run on ARM processors but what wasn’t clear was whether or not current applications would be compatible with the flavour of Windows running on said architecture. As it turns out x86 applications won’t work on the ARM version of Windows however applications written on the WinRT framework will run on every platform with only minor code changes (we’re talking single digit lines here). Those legacy applications will still run perfectly well in the Desktop mode that Windows 8 offers and they’ll be far from second class citizens as Microsoft recognizes how things like their Office suite don’t translate well to the tablet environment.

At the same time Microsoft has also announced that the web browser in the Metro UI will not support any kind of plug-ins including their very own Silverlight. Of course you’re always welcome to switch into desktop mode should you visit a website that requires a plug-in but Microsoft said the aim is for everyone to transition away from plug-ins and onto the HTML5/JavaScript stack. On the surface this seems to verify the notion that Silverlight developers are screwed as all their apps are second class citizens in the new Metro world. However since WinRT apps are developed in a very similar way to that of Silverlight apps the transition to the Metro platform will probably be nothing more than changing namespaces and tidying up the UI so it fits in with the new design. Distribution of said apps will then come via the Microsoft app store, rather than a company’s web server. Sure it’s a paradigm shift away from what they’re currently used to, but Silverlight developers will find themselves right at home with WinRT.

Taking this all into consideration it seems like there will be a line in the sand between what I’ll call “Full” Windows 8 users and “Metro” based users. Whilst initially I thought that Jupiter would mean any application (not just those developed on WinRT) would be able to run anywhere it seems that only WinRT apps have that benefit, with current x86 apps relegated to desktop mode. That leads me to the conclusion that the full Windows 8 experience, including the Desktop app, won’t be available to all users. In fact those running on ARM architecture more than likely won’t have access to the desktop at all instead being relegated to just the Metro UI. This isn’t a bad thing at all since tablets, phones et. al. have very different use cases than those of the desktop but, on the surface at least, it would appear to be a step away from their Three Screens vision.

From what I can tell though Microsoft believes the future is Metro styled apps for both desktop and tablet users a like. John Gruber said it best when he said ”it’s going to be as if Mac OS X could run iPad apps, but iPads could still only run iPad apps. Metro everywhere, not Windows everywhere.” which I believe is an apt analogy. I believe Microsoft will push WinRT/Metro as the API to rule them all and with them demoing Xbox Live on Windows 8 it would seem that at least on some level WinRT will be making it’s way to the Xbox, thereby realizing Microsoft’s Three Screens idea. Whether the integration between those 3 platforms works as well as advertised remains to be seen but the demo’s shown at BUILD are definitely promising.