Introduction
Windows 10 marks the second radical departure from the traditional Windows desktop applications in as many releases. Whereas Windows 8.x saw the introduction of the modern interface and major support for touch-based apps through Windows Runtime (WinRT), Windows 10 has introduced the Universal Windows Platform (UWP). An evolutionary change from the Windows 8 apps, UWP apps run on any device that runs Windows 10. This includes tablets, desktop PCs, hybrid systems, and phones. Taking advantage of UWP will let you focus on writing solid code while having your app automatically benefit from the multitude of hardware devices that exist.
The UWP approach works by targeting one or more device families rather than a specific operating system. Your app can elect to only use the base APIs provided by UWP that are found on all devices, or it can augment those with the additional device-specific APIs. Choosing which APIs to use can be a decision made during design (such as targeting the Xbox specifically), or it can be done at runtime, adjusting functionality to suit the device that your app is currently running on. This means that a single UWP app could be run across the desktop, phone, and tablet environments, and dynamically adjust its user interface to its current host device.
By targeting the UWP, developing an app that can be used across multiple device families is easier. And providing this flexibility makes it more valuable to your users, who can access the app on the device that they prefer. When you decide to support a new device family, core functionality can be used as is, shortening your development time as only APIs specific to that platform have to be considered for implementation.
Note
The UWP supports several device families. That includes the following:
- Traditional Windows PC (laptop, desktop, touch-enabled devices, and the like)
- Mobile (Windows Phone)
- Xbox
- Internet of Things (IoT)
- Microsoft HoloLens
- Raspberry Pi 2 (via Windows 10 IoT Core)
Developing UWP apps is rather straightforward: install Windows 10 on your development machine (or VM), and then install VS2015. Both VS Community and VS Express for Windows 10 support UWP app development, so a paid edition of VS2015 is not required. What's more, UWP supports several languages so that you can get started using what you already know: C#, Visual Basic, C++, or JavaScript.
The net result is that Microsoft has positioned UWP both as their response to the shortcomings of their Windows 8.X app strategy, and as a proactive attempt at allowing developers a streamlined way to support the wide variety of devices that end-users have at their disposal. As a developer, you should benefit from the ability to support a number of different devices from a single code base using a language that you are already comfortable with.
Tip
While Microsoft strongly encourages developers to distribute their UWP apps through Microsoft's app store, keep in mind this is not required. You target the devices you want through UWP, and deploy the finished app the way you want.
In this chapter, we will explore the world of UWP apps from top to bottom. By the end of this chapter, you should have a solid understanding of the major UWP concepts, and how to get started with UWP app creation, whether you are building them from scratch or from an existing codebase.