What is Universal Windows Platform (UWP)?
What is Universal Windows Platform (UWP)?
The author describes what UWP is, what it means for developers, and why it matters.
Join the DZone community and get the full member experience.Join For Free
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.
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.
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:
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:
- 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 the same views — just think about rich desktop clients and the thinner version for mobile.
- 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.
- 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.
To get started, 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)
Published at DZone with permission of Gunnar Peipman . See the original article here.
Opinions expressed by DZone contributors are their own.