Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

What is Universal Windows Platform (UWP)?

DZone's Guide to

What is Universal Windows Platform (UWP)?

The author describes what UWP is, what it means for developers, and why it matters.

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

Universal Windows Platform is the almost new kid on the street and it’s time for developers to find out what it is, how it works, and why to bother. In this post, I make a short introduction to UWP for developers. I also share some of my thoughts about the platform and point out some useful resources that help you to get started.

What Is Universal Windows Platform?

The idea of Universal Windows Platform (UWP) is to target different devices and hardware platforms that Windows supports with the same code base.

Instead of having one version of source code for phone apps and another for desktop apps, we have one code base and perhaps one set of views. We can build our application for target processor architecture that Windows supports with no modifications to source code, and we can run our applications on different devices.

universalapps-overview

This picture is from the MSDN article Guide to Universal Windows Platform (UWP) apps.


This is something that competitors have tried for years but we can’t find any big success stories. Microsoft seems to have finished their universal dream this year (it’s my speculation) and developers can already jump in today.

To get a better idea of what I mean, just think about an app that you want to be available on different devices and then take a look at the following picture that shows where you can easily go with universal apps.

windows-10-everywhere - small
Picture from Windows Experience blog post Welcoming Developers to Windows 10


What It Means for Developers?

Before Windows 10, universal apps were targeting operating systems. In Visual Studio, we had two projects — one for Windows 8 and the other for Windows Phone 8. With Windows 10 we have one project. We can build it for different target architectures as shown in the following screenshot:

vs2015-uwa10-beeriot


If we select ARM then we can deploy and run our application on Windows Phone and Windows 10 IoT Core. x86 and x64 allow us to run our application on desktop Windows and Windows Phone emulators.

The main benefits for developers are:

  1. Less code to write.
  2. Same views work on screens with different sizes.
  3. Sell universal apps through Windows Store.

If it makes UWP seem like a silver bullet then here are some obstacles you may face:

  1. Not all universal apps can share the same views — just think about rich desktop clients and the thinner version for mobile.
  2. You still have to write some platform dependent code and it’s not always easy to choose between similar APIs in System namespace and universal apps.
  3. Although views can be used with different screens with no modifications you must still add little improvements to views based on screen sizes to provide the finest experience to users.

I am currently learning to build UWP apps and it’s not something hard. Okay, maybe it actually is but Microsoft has made it really easy for us.

Is There Any Future for UWP Apps?

This is a tough question to answer as we don’t have much information about Microsoft's plans with the platform, and especially with phones. Based on what I have read from the public space it seems like Microsoft is preparing for a new coming. I hope this time techies have a stronger position over marketing to say how things must be done. Rumors are that new Windows Phone devices by Microsoft are engineered by the team behind Surface tablets and Surface Book. Also, I see more and more UWP apps announced. Tempo is slow but, hopefully, we will see a rise by the fall of this year.

Although phones will be major players on UWP it’s still possible that the third coming fails. If this is the case then the only way for Microsoft to get better presence in the mobile space is to make CoreCLR for UWP to run on Android and iOS. I am not sure if they would make such a wild bet but let’s see. Microsoft has made some of their popular apps available on Android and iOS, and I take it as a sign of the importance of the mobile space for Microsoft.

Getting Started

To get started, you can use the following resources:

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:
uwp

Published at DZone with permission of Gunnar Peipman. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}