In the first part of Marlabs’ Windows 8 Developer Preview we examined some of the interesting features that Windows 8 offers for end-users. Now let us take a look at what Windows 8 promises for developers.
Features for Developers
Windows 8 comes with WinRT, a new object oriented native/unmanaged API for developing ‘Metro’ applications for Windows. WinRT APIs are expected to replace the Win32 APIs. WinRT projects types using Meta data, and is fully object oriented and you can access WinRT directly from managed languages like C#. Here are a couple of interesting reads about WinRT.
Developing for WinRT
WinRT is going to the ‘the runtime’ for Windows, across multiple devices like PCs, Tablets etc. You can develop Windows Metro style applications on top of WinRT in:
C#/VB.NET and Xaml
Xaml libraries with WinRT are now re-written in C++, and don’t have any .NET dependencies. WinRT XAML is a subset of the earlier XAML libraries that was available with .NET, and doesn’t support some features like DataTriggers etc as of now. Presently, you can access only a subset of the .NET BCL/Runtime from your C#/VB.NET + XAML WinRT application.
This doesn’t even support .NET Client Profile, it is just .NET core profile with access to a minimum set of .NET namespaces, combined with XAML namespaces now in Windows.UI. The entire CLR will be loaded at the time of execution, but you’ll be able to access only a subset of that. As simple as that. This is to ensure that you are running in a sandboxed environment, and CLR comes into play as a thin layer only for binding your calls to WinRT at run time. As WinRT is object oriented and has managed data, you are any way developing directly against WinRT.
C++ and XAML
If you are developing in C++ and XAML, your code will be compiled directly to an unmanaged library. I assume this provides the maximum performance advantage, as your code is directly compiled to native code.
You may continue to develop .NET/C#/Silverlight applications for classic desktop scenarios, but if you need to develop Metro applications, then you have to develop against WinRT.
New APIs and Extension Points
Windows 8 Features a number of new APIs and Extension Points. These include:
- Windows.UI – The Xaml library is now re-written in C#, and is part of WinRT
- Charms – Apps can share charms, to inter-operate. For example, an “Insert Picture” dialog box can show you results from other applications that can handle the image/picture data type.
- Direct Compute API - Enables you to leverage the power of GPU in your applications
- Sensor Fusion API
- A Single API for all your sensors like Accelerometer, magnetometer and gyroscope
- Communication APIs for Sockets, Streams and all
- Devices APIs for Geolocation, Sensors, Near Field Communication etc
- Media Apis for Playback, Capture, Effects
- Other OS Services – Application services, Threading, Memory Management, Authentication etc.
Windows Live Integration
Support for Wide Variety of Hardware
The hardware support for Windows 8 seems really awesome. The demos features Windows 8 running on a variety of hardware devices. New and improved features include:
- Multi monitor support with start button on all screens
- Hyper V Support for client
- USB 3 Support
- Hardware acceleration for all applications
- Malware detection in boot strapper
- A boot mode called “Cold Boot“ which is super fast
After installing Windows 8, and exploring the same, I should say I’m pretty much convinced that Microsoft has got the equation right. They corrected the Tablet part of the equation, and got the entire “Cloud and all the screens” stack in place, with proper platforms and a nice set of developer tools. And without doubt, Windows 8 tablet devices are going to be a definite competitor for Android and iOS/iPad in the tablet market space.With Windows 8 in its kitty, Microsoft has officially entered the post PC era, and may pose some tough questions for Apple.