Advertisment

Windows 8 Preview: What's New for Developers?

author-image
PCQ Bureau
New Update

One of the largest selling products in the computer world with the highest number of users worldwide, Windows is a major part of the universe of anyone who develops software. Before the formal announcement, there were lot of rumors regarding what it would bring — both for the consumers as well as for the developers. Everyone wanted to see what would Microsoft do to stop the seeming juggernaut of Apple's iOS and Google's Android platform.

Advertisment

Snapshot

Applies To: .NET Developers

USP: Learn about the latest features of Windows 8 and what all developers can achieve using it

Related articles: The Indian Hand Behind Windows 7 http://ld2.in/3qa

Search engine keywords: Windows 8

What was previewed at the BUILD 2011 conference in September blew almost everyone away — both at the consumer level as well as at the developer level. At the consumer level, everyone liked that the new, re-imagined Windows was not just a rip-off of iOS or Android, but a complete, cohesive experience — right from the start experience.

But what was more important — at least currently as this is not even a Beta release — is the importance given to developers with the new development stack. Given that every single existing PC capable of running Windows 7 (and to an extent Windows Vista and even Windows XP) can run Windows 8, as well as the completely new touch-centric set of hardware that is coming soon at the time of its launch, there are a huge number of applications (not “apps”) — again, everything from for an enterprise to a consumer — already available. Any applications written now for modern platforms will continue to run on Windows 8 as well.

Advertisment

So has nothing really changed? Actually the opposite has true. There are a huge number of new changes in Windows 8. But in this article we'll talk only about the changes that are relevant to developers. So let's delve into the development stack of windows 8.

Advertisment

The first important change that has come is the introduction of a new Windows API called Windows Runtime (WinRT in short). WinRT caused a lot of confusion in the mind of developers till everything was clarified in the BUILD conference.

WinRT, for all practical purposes, replaces the older Win32 API which has been around since Windows was around. The WinRT API allows developers to create what are known as “Metro-style” apps. These are the new type of apps that run natively on the new Start screen, are fully multi-touch capable and run in full-screen mode.

Metro apps can be written in many different languages — C++, C#, VB or HTML5+CSS3+JavaScript. In the case of the .NET languages, WinRT loads the .NET 4.5 CLR — but only allows access to a sanitized subset of the same. This means although you can use the same language & syntax of a normal .NET application, you can only use a “clean” subset of this. This is not unlike Silverlight today. In fact, the design or front-end elements of a Metro app written with a .NET language is nothing but XAML! So, all your existing investments in learning Silverlight for desktop, browser or Windows Phone all remain intact.

Advertisment

The other option — using HTML5 and CSS3 with JavaScript code — also allows for rich Metro style content to be created quite easily. JavaScript is a first class citizen in this world and gets compiled to the same base as the rest of the WinRT apps. Using this option also allows you to scale out to the Web if you wish to or even use a different platform for your app.

All WinRT apps get packaged into .APPX packages. These are the deployment blocks for your app that can be sent to the Microsoft App Store that is built in. Similar to the app stores of mobile platforms, the MS App Store allows you to deploy these apps globally very quickly.

Advertisment

Traditional apps (both legacy and .NET apps) continue to work as they used to. Except that instead of using the Metro UI they will run in the traditional desktop. The new version of the CLR (.NET 4.5) brings in many new features as well — but does not take away the core of the programming methods you were used to.

The Windows 8 Dev Preview comes with an early release of Visual Studio 11 Express to allow developers to try out creating Metro apps. if you haven't downloaded it yet, you should.

Advertisment