DEV Community

Claudio Bernasconi
Claudio Bernasconi

Posted on • Originally published at claudiobernasconi.ch

Introduction to the Universal Windows Platform

What is the Windows Universal Platform (UWP)? As a .NET developer you might have heard about UWP, but you don’t know what it is and how it works? Great, me neither! Let’s learn about it together.

What is the Windows Universal Platform (UWP)?

In the official documentation about the Universal Windows Platform (UWP), Microsoft defines UWP as a platform that lets you build apps for any Windows device. They mention PCs, phones, Xbox One, HoloLens, “and more.”

UWP replaces the Windows Runtime (WinRT) which was introduced with the release of Windows 8. WinRT was designed as a modern alternative to the Win32 APIs.

Publish to the Microsoft Store

One of the key benefits of creating a UWP app is access to the Microsoft store. You might think that this store is a dwarf and that the Apple App Store or Google Play Store (Android) are much bigger, but I guess you’re wrong as I was before researching the numbers.

According to a ZDNet article from October 2018 which features official data published by the companies behind the products, there are 2 billion active Android devices (Google), 1.3 billion active iOS devices (Apple) and 700 million PCs running Windows 10 (Microsoft).

Yes, only around half as many people have access to the Microsoft Store than people have access to the Apple App store. But if you think about the numbers, I think 700 million is still a pretty significant number, and the most important thing is that the number is rapidly growing.

If you create a UWP app, you can make use of the Microsoft Store and sell your product to millions of people around the world. Distribution of Windows desktop applications has never been easier than before.

Revenue share of UWP apps in the Microsoft Store

Apple uses its famous 70:30 revenue share for its apps which means that the creator of the app gets 70% of the revenue whereas the platform takes 30% of every sale. Google has the same revenue split on its Google Play Store.

Microsoft also takes 30% for all apps with an upfront price and games in general, whereas they only take 15% for apps that are not games and that are billed to Customers on a subscription basis. For more detail take a look at the App Developer Agreement (Chapter 6, letter b).

It means that if you are selling a subscription-based app (excluding games), you’re able to receive a revenue share of 85% whereas Microsoft only takes 15% which is only half of the cut Apple or Google make.

Microsoft has recently announced that they will increase the revenue share of a subset of apps even further to 95%. If you compare it to the 70% of Apple and Google – it’s a huge difference! It is, however, an announcement and there are no more details available right now.

What about other devices?

We already mentioned the 700 million PCs running Windows 10 which are a potential target of your UWP app. Let’s take a look at the other devices which give the platform its “Universal” name.

Microsoft mentions phones, Xbox One, and HoloLens besides PCs as targets of UWP apps. Let’s be honest. Today, most of the phones are running Android (74%) or iOS (23%). Microsoft has a market share of 0.3%. I’m going to make the statement that there is currently no market for UWP apps on smartphones.

Xbox One is an interesting target because there are about 40 million devices sold. The numbers vary depending on sources. Microsoft does not communicate official numbers.

In addition to the 700 million PCs, there are about 40 million Xbox Ones sold. Great. But…

Which type of apps would you write for Windows desktop and Xbox One?

The thing that’s on my mind is which app would I write that people would want to install on their desktop computer and on their Xbox One? Maybe games? I cannot think of an app that I would write with both devices in mind.

If you have an Xbox One or if you know people who are running apps on their Xbox One as well as on their desktop computer, please write it as a comment below this article.

There are also IoT devices, Surface Hub and HoloLens. I do not know about these devices, and therefore I do not make any statements about whether these devices are an argument to build a UWP app or not.

What’s the difference between UWP and Xamarin?

Xamarin is Microsofts cross-platform technology for mobile app development. Apps written using Xamarin can be compiled for Android, iOS (and Windows Phone). You can also target UWP.

For a more detailed insight into the differences between Xamarin and the Universal Windows Platform, check out Tyler Whitney’s article.

UWP is not cross-platform but (as its name already tells) universal for any Windows device. It means that UWP apps do not run on other platforms than Windows, but they run on all different Windows devices mentioned in the introduction of this article.

What’s the difference between UWP and WPF?

WPF was released in 2006 as part of the .NET Framework 3.0, and it runs on the .NET Framework which is a part of several Windows versions from Windows XP to Windows 10. WPF uses XAML as user interface design language which was introduced with Silverlight.

Its purpose was to be a modern alternative to WinForms or Win32 development of Windows desktop applications. If you want to read more about the current state of WPF, read my recent article about WPF.

UWP was introduced with Windows 10 in 2015, and therefore UWP apps do not run on older Windows versions. UWP was created with touch screen in mind and also uses XAML as its user interface design language.

The most significant difference between WPF and UWP applications is that WPF applications are installed on the local machine using installers without any security checks. They’re also able to write to the Windows registry.

UWP apps must pass Microsoft’s certification process and can be installed using the Microsoft Store, and there are restrictions on what an app can do during the installation process.

If you want to dive deeper into UWP vs. WPF check out this article.

How can I develop UWP apps?

I am sure you as a developer want to know how you can build a UWP app. It’s possible to write them in C#, C++, Visual Basic, and JavaScript. User Interface technologies include XAML, HTML, and DirectX.

Microsoft wants to make it as simple as possible for every developer to build a UWP by supporting languages and tools (Visual Studio) developers already know and love.

What are the differences between UWP, Android and iOS apps?

Microsoft has written a big article which explains the differences between the major app platforms in great detail.

It covers user interface design, controls, data binding, UI automation, visual styling, navigation, app structuring, data storage, web sockets, HTTP clients, general tooling and app lifecycle management.

It also provides information about performance, monetization, notification management, media capturing and rendering, sensors, location and mapping, app-to-app design and software design.

If you are familiar with either Android or iOS development and want to get started with UWP apps, I recommend checking out this resource. I have previously developed Android apps, and for me, it is a very helpful resource.

How to submit a UWP app to the Microsoft Store?

If you decide to write a UWP app and if you want to upload the app to the Microsoft Store you need to visit the Microsoft Partner Center.

You have to register yourself as an app developer before you’re able to upload your first app. This registration is only required once. Your future apps can be published much simpler.

Where do I start if I want to write a UWP app?

Microsoft provides a tutorial on how to write your first UWP app for various programming languages including:

  • C# using XAML
  • C++ using XAML
  • JavaScript and HTML

It’s an excellent place to get started with UWP development and write your first UWP app.

Windows Template Studio

Windows Template Studio is a Visual Studio extension which is designed to accelerate the creation of new UWP apps using a wizard-based experience.

In my opinion, this extension is pretty helpful as it generates boilerplate code for you. It can speed up the development process although you still need to understand what the tool does for you. I suggest starting with the fundamentals and using Windows Template Studio when you’re already familiar with the fundamentals.

It supports different navigation styles, different app design patterns like code behind, basic MVVM, MVVMLight, Caliburn.Micro and Prism. It also allows you to create different pages like web views or master/detail pages and many more little productivity helpers. You can take a closer look at its GitHub page.

Windows Community Toolkit

The Windows Community Toolkit (WCT) is a collection of helper functions, custom controls, and app services. It offers a lot of different additions to the UWP fundamentals provided by the platform itself.

WCT is part of the .NET Foundation and is open-source. If you develop your UWP application in C# this might be a helpful library.

UWP App Tips

UWP App tips is a blog written by Alvin Ashcraft from the C# .NET community. Alvin is a Microsoft MVP and has written 35+ blog posts about Universal Windows Platform app development.

It’s a great resource to get started as well as to read about more advanced topics as well as other community resources.

Personal opinion

UWP is a compelling new opportunity for app developers who prefer to write apps on the Microsoft stack or want to deliver software to Windows desktop systems.

The deployment using the Microsoft Store gives the user a higher degree of security compared to traditional software installations. As a developer, you can make use of the Microsoft Store to get exposure for your app. If your application is excellent, it will be found and installed like in other App stores.

You need to keep in mind that this service comes with a cost of up to 30% of the price you charge your users. In exchange, you can use the Microsoft Store to conveniently process payments whereas in a traditional world you would have to set up a payment process on your own.

In my opinion, it depends on the use case of the application. Is it for end-users or business-users? Is it an internal app or do customers of your company use the app? Depending on the scenario, UWP or WPF (or even Xamarin) can be the right choice. The great news is that we as developers have a choice.

I question the universal part of the Universal Windows Platform. I see the option to deploy onto other devices than desktop computers but I think that most applications will only run on computers running Windows 10. But I don’t believe that this is bad either. Maybe Microsoft steps into the smartphone market again?

What do you think about the current state of Windows desktop development and UWP in particular? Let me know about it in the comments. I would love to hear from you.

This article was originally published on claudiobernasconi.ch on February 28th, 2019.

Latest comments (1)

Collapse
 
tunaxor profile image
Angel Daniel Munoz Gonzalez

While we've had UWP from a few years now, the landscape in UWP doesn't look just promising yet I've been looking at UWP even from the Windows 8 apps days I hope it keeps getting better now days

that being said, it's an awesome experience, I really love the UWP ecosystem I just wish there was more love to it!

Apps are quite easy to make, and now days even PWA's can do some cool stuff with access to the WinRT API

Will look forward to more posts on the UWP topic ;)