Unpacking Microsoft's universal apps strategy

Write an app for one Microsoft platform and it will (more or less) run on all other Microsoft platforms, including Windows Phone -- thanks in large part to Windows 10

Application developers face more platform choices than ever these days. Even within the Microsoft world, the question persists: Should you target desktop or mobile?

That’s where Microsoft’s universal apps programming model comes in. The Windows 10 Technical Preview puts universal apps front and center, with the goal of running common code to all Microsoft platforms and stores: Windows phones, tablets, and PCs, as well as the Xbox One in the living room and the 80-inch Surface Hub on the office wall.

Universal apps are key to Microsoft’s reinvention of its Windows 8/WinRT programming model. Designed to move Windows application development away from the aging and overly complex Win32 APIs, WinRT introduced new, less complex APIs that owed more to Web programming models, along with a sandboxed runtime and a mix of XAML and HTML UI options.

As WinRT evolved with Windows 8 and as Windows Phone moved to the NT kernel, Microsoft began to add features to simplify the development of cross-platform applications. Portable Class Libraries allowed apps to share core business logic across platforms. Code needed to be built into libraries and was limited to the APIs it could call. Even so, it made it easier to share code between desktop and phone, as well as to Android, iOS, and Mac OS (thanks to support in Xamarin’s tools).

Windows 8.1 Update 1 brought the next stage in Microsoft’s cross-platform story: the first appearance of its universal apps model. Instead of being wrapped up as shareable libraries, universal apps could be built as Visual Studio projects – and delivered to both the Windows and Windows Phone stores. There was one drawback: While apps could share assets, they needed separate user experiences, and you had to build separate binaries for each Microsoft platform.

The Windows 8.1 model, according to Partner Director of Program Management Developer Platform Kevin Gallo, was “write once, tune everywhere,” similar to the Xamarin approach. Building apps using Xamarin’s tools meant creating core code that could be shared between platforms, then creating native user interfaces for each OS (and for phones and tablets). Similarly, universal apps could share some XAML code, but the real benefit for developers was a common API surface area for both phone and desktop.

To continue reading this article register now