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
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.