Volume 33 Number 5
By Michael Desmond | May 2018
Andrew Whitechapel wrote this month’s lead feature article, “Closing UWP-Win32 Gaps,” which describes three important new capabilities added to Universal Windows Platform (UWP) apps and how developers can access them. Enabled as part of the Windows 10 version 1803 update is support in UWP apps for multi-instancing, broadened file system access, and the ability to write headless console apps in UWP. All three bring to UWP capabilities that have long been present in Win32 and .NET Framework.
“We had heard from various sources that these were important gaps in the UWP story—from internal app teams, from the MVP community and from other customers who are building or considering building UWP apps,” says Whitechapel, who is a program manager in the Microsoft Windows division. “Multi-instancing was largely seen as a no-brainer.”
He doesn’t expect developers to scramble to add the capability to most existing UWP apps, saying that “only more complex apps with a sophisticated UX would take advantage initially,” although he expects usage to increase over time as multi-instancing reveals new app opportunities. But for those apps that need it, the new support eliminates fragile and complex multi-windowing schemes as a workaround. To best support developers, Microsoft introduced two tiers of multi-instancing: a simple implementation that requires only a manifest be added to a new or existing UWP project, and a more granular implementation that relies on redirection APIs.
Another key improvement is extended file system support. As a security measure, UWP apps by default were limited to select folders such as the Pictures or Music library. Accessing other areas of local or remote storage required invoking a FilePicker dialog and prompting the user to choose the location—a clumsy process that breaks the UI flow. Now UWP apps gain implicit access to files and folders in the current working directory and below.
“We were very cautious in pursuing broad file system access because of the obvious security and privacy concerns,” Whitechapel says. “Ultimately, we felt that the restricted capability, plus the user-consent prompt—coupled with the user’s ability to disable this access for any given app, or globally for all apps—was enough to mitigate these concerns.”
In fact, file system access was improved as part of the effort to enable console app support in UWP—an advancement of particular import to developers and IT admins. As Whitechapel tells it, the dev team realized the challenge facing canonical console apps, like findstr and grep, that search for patterns within files.
“Such an app would be severely crippled—to the point of being almost useless—if it couldn’t get broader access to the file system,” he says.
Interest in console app development for UWP has been sharp. Whitechapel says that the Visual Studio Console UWP project templates have recorded more than 20,000 installs since they were released. And he says that file system access and multi-instancing have both produced “vociferous support.”
So what’s on tap for UWP going forward? Whitechapel points to the Windows Developer Day keynote (youtu.be/D6YAJxFsmuM) by Microsoft Corporate Vice President Kevin Gallo, where he discussed efforts to help desktop app developers modernize their code with new technologies like Modern WebView and MSIX containerization. He also singles out the Internet of Things and artificial intelligence as areas of heavy investment.
Michael Desmond is the Editor-in-Chief of MSDN Magazine.