A Look Inside the Windows 10 App Model: What Does It Mean for Developers?
With Windows 10, Microsoft is turning a new leaf. Unlike the fractured platforms of yesteryear, Microsoft's latest plans with Windows 10 is to provide a framework that will allow applications to run on all devices powered by Microsoft. This is pretty amazing, considering the fact that the various devices (desktops, tablets, mobile, and Xbox) have different hardware.
All this is powered with the Universal Windows Platform App model.
The Universal Windows Platform (UWP) App model defines the application lifecycle. It unifies the experience across all Windows devices and scales from IoT, mobile, PC, Xbox, and Hololens devices. The Universal Windows Platform App model helps define the story on how the application will be installed/uninstalled/updated, how resources and runtime management will work, what be the data model will look like, and so forth.
Classic Windows Apps did not have a systemic definition of an app model. This resulted in registry growth/fragmentation and a clean uninstall is nearly impossible. This eventually leads to the Windows Registry getting loaded with junk.
An App model helps define a clear deployment model and provides a better way to install/uninstall and update the application. It also enables isolation of registry and disk access and enforces an App Model policy.
Implications to Windows Desktop Applications
With the Universal Windows Platform, the Windows Desktop will be supported. However, there will be a Windows Desktop App model policy that changes the behavior of how certain desktop applications can operate on Windows 10.
Under the new UWP App mode, Desktop applications will have full API access and will support the existing desktop app lifecycle. However, access to system components will be denied. Administrator elevation and in-process extensibility will also be prevented.
Universal Windows Platform App Model
The reasons for these new-found restrictions is to prevent the user from even regretting installing the application. Apps can be gotten from the Store and there will be a Universal store vending the apps that work on a variety of platforms. The new mantra is "Buy once, enjoy everywhere."
With Windows 10, AppX with a size greater than 150GB will be supported.
Developers, unlocking your device is no longer a complex problem that requires chickens and goats to be sacrificed. With Windows 10, this is just a setting on a device and, for enterprise users, this can be controlled by a registry key.
Support for Removable Storage
With the UWP, users can now determine whether applications can be installed or moved to removable storage. For security reasons, applications are encrypted on removable storage. By default, applications are enabled for removable storage; however, developers can opt out with a flag in the application manifest.
The UWP app model supports extended execution for foreground applications that is critical for certain task completion scenarios, such as completing the saving of a file or turn-by-turn navigation. Applications can request more time, which is determined by the type of device the application is running on.
Applications now can tell the OS, upon startup, that they intend to keep running.
All Universal App (apps built on the Universal Windows Platform) will support resume by default, including Windows Phone 8.1 apps as well as Windows 8 and 8.1 desktop applications. Windows Phone 7.x and Windows Phone 8.0 do not support this. This means that there are now two different models for your application: (i) applications always resumes, and (ii) application goes to home screen. Depending on your application, you can choose which experience you want to deliver to your users.
Convergence of the Navigation Model
The Back button will now be available to UWP applications and the behavior will be same as what we get on Windows Phones today—Go back to where you came from.
The UWP App model allows apps to integrate via URL-based activation/communication.
Foreground-to-foreground integration (for example, launching Skype from Contacts app) will work as we see it today. Foreground-to-background integration is new in Windows 10 and is used for application services where you can publish a background task that can be called by other apps.
As you can see, the new Windows 10 App model brings out the cohesiveness of the Windows ecosystem like no other prior Windows release has attempted.
In this article, we learned about the new Windows 10 app model, called the Universal Windows Platform App model. I hope you have found this information useful.
About the Author
Vipul Patel is a technology geek based in Seattle. He can be reached at email@example.com. You can visit his LinkedIn profile at https://www.linkedin.com/pub/vipul-patel/6/675/508.