Universal Windows Platform is 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 short introduction to UWP for developers. I also share some of my thoughts about platform and point out some useful resources that help you to get started.
What is Universal Windows Platform (UWP)?
The idea of Universal Windows Platform 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 the another one 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 and with no modifications to source code we can run our applications on different devices.
This picture is taken from 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 get finished their universal dream this year (it’s my speculation) and developers can jump in already today.
To get better idea what I mean just wonder about your app you want to be available in different devices and then take a look at the following picture that shows where you can easily go with universal apps.
Picture taken 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 one for Windows Phone 8. With Windows 10 we have one project. We can build it for different target architectures like shown on the following screenshot.
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.
Main benefits for developers are:
- Less code to write.
- Same views work on screens with different sizes.
- Sell universal apps through Windows Store.
If it makes UWP seem like a silver bullet then here are some obstacles you may face:
- Not all universal apps can share same views – just think about rich desktop client and its way thinner version for mobile.
- You still have to write some platform dependent code and it’s not always easy to choose between similar API-s in System namespace and universal apps.
- Although views can be used with different screens with no modifications you must still do little improvements to views based on screen sizes to provide 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 tough question to answer as we don’t have much information about what are Microsoft plans with platform and specially with phones. Based on what I have read from public space it seems like Microsoft is preparing for new coming. I hope this time techies have stronger position over marketing to say how things must be done. By rumours new Windows Phone devices by Microsoft are engineered by team behind Surface tablets and Surface Book. Also I see more and more UWP apps announced. Tempo is slow but hopefully we will see raise in this autumn.
Although phones will be major players on UWP it’s still possible that third coming fails. If this is the case then the only way for Microsoft to get better presence in mobile space is to make CoreCLR for UWP to run on Android and iOS. I am not sure if they 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 importance of mobile space for Microsoft.
To get startet you can use the following resources:
- Guide to Universal Windows Platform (UWP) apps (MSDN)
- Windows 10: Getting Started with UWP (MVA)
- UWP sessions from different events (Channel 9)
- Presentation: Brewing Eisbock with Raspberry PI and Windows 10 IoT
(my presentation and reference materials you can use to get started with code)