Page 8 - MSDN Magazine, May 2018
P. 8

Editor’s NotE MICHAEL DESMOND Improving UWP
Andrew Whitechapel wrote this month’s lead feature article, “Closing UWP-Win32 Gaps,” which describes three important new capabil- ities 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 con- sole 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 communityandfromothercustomerswhoarebuildingorcon- sidering building UWP apps,” says Whitechapel, who is a program manager in the Microsoft Windows division. “Multi-instancing was largely seen as a no-brainer.”
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.
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 sup- port 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 becauseoftheobvioussecurityandprivacyconcerns,”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 partic- ular 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.
Visit us at msdn.microsoft.com/magazine. Questions, comments or suggestions for MSDN Magazine? Send them to the editor: mmeditor@microsoft.com.
© 2018 Microsoft Corporation. All rights reserved.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, you are not permitted to reproduce, store, or introduce into a retrieval system MSDN Magazine or any part of MSDN Magazine. If you have purchased or have otherwise properly acquired a copy of MSDN Magazine in paper format, you are permitted to physically transfer this paper copy in unmodified form. Otherwise, you are not permitted to transmit copies of MSDN Magazine (or any part of MSDN Magazine) in any form or by any means without the express written permission of Microsoft Corporation.
A listing of Microsoft Corporation trademarks can be found at microsoft.com/library/toolbar/3.0/trademarks/en-us.mspx. Other trademarks or trade names mentioned herein are the property of their respective owners.
MSDN Magazine is published by 1105 Media, Inc. 1105 Media, Inc. is an independent company not affiliated with Microsoft Corporation. Microsoft Corporation is solely responsible for the editorial contents of this magazine. The recommendations and technical guidelines in MSDN Magazine are based on specific environments and configurations. These recommendations or guidelines may not apply to dissimilar configurations. Microsoft Corporation does not make any representation or warranty, express or implied, with respect to any code or other information herein and disclaims any liability whatsoever for any use of such code or other information. MSDN Magazine, MSDN and Microsoft logos are used by 1105 Media, Inc. under license from owner.
4 msdn magazine


































































































   6   7   8   9   10