Universal Windows Platform apps

This year, on the 29th of July, Microsoft officially released Windows 10, an operating system designed to provide a user experience more enjoyable, sharing the same design and functionality on all devices that will run this system.

Even though Windows 10 is now available only for PCs and tablets, the company plans to release seven different editions including two versions of Windows 10 Mobile and one Windows 10 IoT Core (Internet of Things). All of them will include the same core API and similar features.

Along with Windows 10 release, Microsoft introduces Universal Windows Platform (UWP), a feature that enables a single application – Universal Windows App (UWA) – to run on multiple devices such as Desktop computers, Mobiles, Surface Hubs, HoloLens having the same user experience.

Windows 10 also simplifies the development and distribution of UWP apps, as it provides a common API available for all devices, all applications being distributed through a single package that can be published on a universal Windows Store.

In this article we will discuss the strengths, weaknesses and possible issues that may be encountered during development of an Universal Windows App.

Advantages:

  • Development is done using a single source code, even if the application target many types of devices. APIs for device specific features, such as the keyboard or the camera, can be conditionally called during runtime without affecting the usage on other environments.
  • UI controls for input and output adapts automatically their appearance and behaviour based on the number of screen pixels or device type.  Adaptability mechanisms like resize, reflow, reveal or changing any other physical properties are made easier using new controls such as RelativePanel and SplitView or Visual State Triggers.
  • Using .NET Native precompilation technology, UWP apps are compiled directly into native binaries before they reach consumer devices. This process brings more performance benefits, less memory consumption and portability, unlike classic applications that require .NET Framework installed locally, and whose managed IL binaries are converted to machine code by CLR during runtime.
  • Applications are packaged and distributed using .AppX packaging format which provides a trustworthy installation mechanism and make the deployment and update process to be consistent. Once purchased and downloaded, these packages can be installed on any type of device.

Disadvantages:

  • UWA are not compatible with any other  version of Windows, except Windows 10.
  • Universal App Development Tools Extension for Visual Studio 2015 which enables UWP development can be installed only on Windows 10.
  • Updates from Windows Phone 8.1 to Windows 10 are not released yet, thereby, these apps cannot be tested on a real mobile environment at the moment.
  • If you want to create applications that target mobile devices having another operating system (Android, iOS) you may turn to using other tools such as Xamarin or Apache Cordova.

 

Good to know before you start developing an application

You will need Windows 10 as operating system and Visual Studio 2015 with “Universal Windows App Development Tools” included in optional features list.

You can chose to write the app in languages such as: Visual C++, C#, Visual Basic and JavaScript. As a markup language, you can use XAML, even HTML and DirectX, for projects written in JavaScript or C++.

Also there are new project templates available for these kind of applications.

newuwpproject

If you want to debug an application using mobile emulators you need to install the software on a physical machine. This machine must run Windows 10 and have support for Hardware-assisted virtualization and Second Level Address Translation (SLAT).

emulators

Visual Studio provides a toolbar to preview your app design during development on different resolutions. This feature is also present in Blend and helps you to define adaptive visual states without writing code manually.

Debugging can be made locally, on desktop environment, but also remotely using a mobile device connected via USB.

Applications can be published on Windows Store directly from Visual Studio, accessing from menu: Project -> Store -> Create App Package. It can be generate a single app package or an app bundle that will contains necessary packages for each processor architecture.

uwppackaging

In order to test the capability of this platform we developed Make It Magic App, a simple application which plays the Make It Magic clips.

makeitmagic

It uses a SplitView control for toggling the videos list and a WebView control that renders HTML specific code for each movie. List width is changed dynamically depending on the screen resolution to keep the user experience enjoyable on any device.

For a programmer familiar with the XAML syntax, developing an application with similar complexity can take a few hours, due to all the tools provided by Visual Studio and all the built-in controls that automatically adapts the application’s appearance and behavior according to each device input/output possibilities.

By releasing Universal Windows Apps, Microsoft proposes a new approach to application development, which avoid creating separate projects or user interfaces for each device type, in order to improve performance and portability.

Leave a Reply

Your email address will not be published. Required fields are marked *