May 28, 2022

Develop for Windows 10 – (1) The Concept of UWP


Windows 10 was unveiled in January 21st. After BUILD Conference at the end of April, most of development stories are clear. Now we can sit down, clear up our minds and see what we have learned, how we get started.

The Windows 10 developer’s story boils down to two words: UWP and Classic.
The Classic Windows Apps

Before there are something called apps, software development, or programming had been a career for tens of years already. Commercial software usually takes many programmer-months of worth of work, unlike the small programs today, you do two on a weekend. On Windows, we call them software, or applications. In the foreseeable future, or maybe forever, those software will still support the entire business world. Microsoft now call them Classic Windows Apps.  You sense the effort of de-emphasis here, but before the business world adopt the so called modern apps, “Classic Windows Apps” is still in the front and center. Doesn’t matter you talk about it or not.

So what are “Classic Windows Apps” really? Any program that runs on Windows 10 that are not Universal Windows Apps. The term Classic Windows Apps is sometimes referred to as desktop applications.

What about MFC? MFC is still there and well. There is no worry it will go away any time soon. If you have been doing .NET programming for Window forms, WPF, you still do what you do.

The surprise is: Starting from Windows 10, Classic Windows Apps can be packaged as Windows Store Apps. It can be delivered over Windows Store, even taking advantage of UWP features.


The UWP: Universal Windows Platform

It’s exhausting to deal with the new terms.  I honestly don’t know when to use Universal Windows Apps, when to use UWP. But in any case, UWP is the center of Windows 10 programming, which doesn’t mean it is more important than the classic apps, but that’s the center of the conversation right now.

Universal Windows Apps are delivered through Windows Store. It’s called one store, one binary, one platform. As a developer, you write on the same code base, build one appx package, publish on one store. Users buy it once, and run on every Windows 10 devices, and have almost same experience.

In Visual Studio, you just choose to create a Windows Universal project type, that’s all. Of course you have to be aware of something call “adaptive app development”, “adaptive programming”.

The details lie in Adaptive: adaptive to difference screen sizes, adaptive to different device families, adaptive to UWP versions. And remember runtime feature detection, Extension SDKs, API Contracts.

From there, your UWP programming begins.