A Deep Dive into Universal Windows Platform
In today’s technologically advanced world, the market needs a common solution for various platforms and considering that Microsoft moved with the market and announced the Universal Windows Platform (UWP) to build a common solution for various Windows devices.
Introduction
Universal Windows Platform is a homogeneous application architecture created by Microsoft. This means that you can create one single application package that can installed and used in various Windows-based platforms including Personal Computers, Laptops, Tablets, Xbox, IoT, Mobile, IoT Headless, Surface Hub and HoloLens.
Designing an app that looks good on such a wide variety of devices can be a challenge. Fortunately, using the built-in features of the Universal Windows Platform you can create a modern UX that works well with a variety of devices, screens and input methods.
Features of Universal Windows Platform
1. Effective Pixels and Scaling:
UWP apps automatically adjust the size of UI elements according to the size of the screen. For effective pixels and scaling, an algorithm was introduced which is used by the system to normalize the way UI elements display on different screens. This scaling algorithm calculates viewing distance and screen density (pixels per inch) to optimize for perceived size (rather than physical size).
That means if the font size is set to 24px for one element, the scaling algorithm ensures that a 24px font on a Bing screen far away is just as legible to the user as a 24px font small screen a few inches away.
2. Secure:
Just like mobile devices running under different environments such as Android and iOS, UWP apps will ask the end-user to get access to required components such as the microphone, webcam, location, USB devices, files, local drives, connected hardware and so on. The user must acknowledge and authorize that access before the app is granted.
3. Common API Surface Across All Devices:
Core APIs of UWP are common for all devices. That means if you have used core APIs then it will run on any Windows 10 device no matter what you have targeted.
4. Extension SDKs Expose the Unique Capabilities of Specific Device Types:
Extension SDKs allow you to call specialized APIs for different devices. For example, if you are focusing on IoT devices, you can also add the IoT extension SDK to your project to target specific features, particularly IoT devices. In addition, you can limit your application to work with a specific device from the Microsoft store. So that your app will run on allowed devices only.
5. Universal Controls and Layout Panels:
It helps to optimize UI for the screen resolution and density. It also helps to adjust the layout of content based on the size of the screen. Some of the changes will take place automatically based on screen and some of the changes need to be addressed. For example, buttons automatically adapt screen size and density. However, when an app is running on the desktop computer, at that point the UI should adept the screen size for efficient use of the large desktop screen space.
6. Common Input Handling:
It allows handling user inputs from various methods like a stylus, touch, a pen, a mouse, and a keyboard or Xbox controller.
7. Monetize Your App:
You can monetize your app as well. There are many options available on the Microsoft store. For example,
- A paid download is the simplest option. Just name the price.
- Trials let users try your app before buying it, with “freemium” options.
- Sale prices to incentivize users.
- In-app purchases.
8. Seamless Install, Uninstall and Upgrade:
UWP app distribution is based on the packaging system. That means an app will never leave anything behind except documents on uninstallation. Apps also support modularized packaging which means the user can download content and extensions based on need or demand.
9. Familiar Development Environment:
UWP apps used Windows Runtime, and native APIs developed in C++. That means one can develop a WPA app using one of the following environment
- XAML UI and C#, VB or C++
- DirectX UI and C++
- JavaScript and HTML
UWP Comparison with WPF
Subject | WPF | UWP |
System Requirement | Windows XP or later | Windows 10 |
Supported Devices | PC, Notebook, Tablet | Personal Computers, Laptops, Tablets, Xbox, IoT, Mobile, IoT Headless, Surface Hub, HoloLens. |
User Interaction | Keyboard and Mouse | Keyboard, Mouse, Touch, Stylus, Pen, Xbox Controller. |
UI Render | Vector graphics using DirectX | Vector graphics using DirectX |
Styling And Theming | Very Powerful but complex | Similar to WPF but with much more limitations. |
UI Definition | XAML | XAML |
Deployment | ClickOnce or classic Installers | Only through Microsoft Store.- Must pass certification- No full freedom on Price- Microsoft will take 30% of income. |
Resource Access | No control. Resources accessible by the user can be accessed by the app. | Only granted resources can be used by the app. |
Performance | Managed code is in general slower than native code and requires more memory. | Apps written in C# or VB compiled to .NET Native. Thus, the app has almost the high performance of a native app. |
Mature | Technology is in maintenance mode. Innovations or improvements cannot be expected. | Actively developing and growing technology. |
Development tools support | Visual Studio, Expression Blend | Visual Studio, Expression Blend |
Drawbacks | Slower than UWP because of the large, scale of managed code. | Distribution and resource access are very limiting. |