Introduction to UWP
Published on 2018-03-07
People use computers and mobile devices to complete various tasks. Through the development of applications, businesses and software engineers help facilitate this process by making sure the software applications do coordinated activities for the benefit of the user. Depending on the type of application, this may involve manipulating various data (text, numbers, etc), presenting information in various ways (including charts, images and more), or helping the user complete various other requirements.
When people work on their desktop computers, they mostly use two kinds of applications: web applications (running in their browser), or desktop applications. In the last couple of years, web applications have gained a lot of popularity, but people still use desktop applications when performance, speed or data privacy is important. For example, I use desktop applications for word processing, watching videos, developing software and more. Some of these apps focus on a single task (ex. playing videos), while others focus on supporting multiple tasks. Any computer (yes, yours too!) runs a lot of desktop applications. If you don't believe me, just open the list of installed applications on your system (search for "Add or remove programs" if you are using Windows), and look at the list there.
In this post, we'll discuss how to develop desktop applications for the Windows operating system. For these kinds of applications, C# and C++ are the most commonly used programming languages, and the technology which we are going to discuss supports them both. Depending on the requirements for your next application, this technology may not suit your needs exactly (for example, maybe you specialize in some other programming language?), but it's nonetheless the best general purpose choice as far as I'm concerned. So, let's get started!
Universal Windows Platform (UWP) is a platform that allows us to create universal apps that run on Windows 10, Xbox One, Windows 10 Mobile and HoloLens. Multiple programming languages are supported, including C++, C#, and VB.NET. Although designed as an extension of the Windows Runtime platform, Universal Windows Platform allows engineers and developers to create applications that can run on various types of devices.
A lot of information about UWP, including design principles, guidelines, tutorials and documentation can be found on the platform's official website. With instructions and easy to follow steps, you can quickly create your first desktop application for Windows 10, a simple game, or learn how to publish your apps on the Windows Store. A lot of videos are also available on Youtube and other video hosting providers.
When it comes down to creating desktop applications, it's worth pointing out that UWP apps will only run on Windows 10 (or newer Windows operating systems). These applications target one or more device families, such as a PC, mobile phone, tablet, Xbox One, and other devices, using Universal Windows Platform Bridges. This is actually pretty great, because the apps can now use the specific capabilities available on those particular devices.
It's interesting to point out that, with Xamarin, UWP apps can not only run on Windows 10 devices, but we can also use all (or most) of the C# code to deliver native applications for Android and iOS (the two most popular smartphone operating systems).
According to the documentation available on Microsoft's website, an UWP app is secure (by declaring device resources and data access), engaging (with live tiles, push notifications and various interactions) and they are able to use device specific tricks and adapt the interface to different device resolutions and screen sizes. All of this is pretty awesome.
The fact that UWP apps can easily be published on the Windows Store means that developers (and businesses) can make money on their apps. For the end users, the main benefit is that the installation process is streamlined and quick, and applications can easily be uninstalled without risk to the machine the application was running on.
Setup Visual Studio
To create UWP applications, I recommend that you run Windows 10 on your computer, and install Visual Studio. Visual Studio is an Integrated Development Environment (IDE), and it's Community version is free and supports the development of Universal Windows Platform (UWP) applications. Just go to Google or Bing, and search for "download Visual Studio Community" and follow the steps on the official Visual Studio website.
The installation process is very easy and straightforward, but you should make sure to select "Universal Windows Platform development" during the installation process. Basically, Visual Studio can be used to create various kinds of web, desktop and mobile applications, and you should select the types of technologies you want to use in order to make sure Visual Studio downloads and installs the necessary files.
Once you're done with the installation, you can now start using Visual Studio Community for desktop application development, or for the development of any of your other projects. Here is a screenshot of how Visual Studio looks during UWP app development.
In the following post (linked here), I will show you how to create your first UWP application using the C# programming language (which I believe is the best programming language for desktop application development). For now, let's just repeat that UWP is an awesome technology with huge potential, and you can use Visual Studio as your Integrated Development Environment for UWP projects.