Microsoft Officially Deprecates UWP – Thurrott.com
thurrott.com
thurrott.com
Win32 was dead, I thought, but I've seen the rise and fall of a few successors at this point, and it still seems to be the option with the best long term prospects.
Last time I did any windows development was about 8 years ago, and win32 was very much the default for most of the folks I worked with (myself included). UWP was just starting to come out, but absolutely nobody I knew was interested in using it.
WinUI 3 is a XAML defined UI stack with a lot of WinRT COMponents. That hasn't changed with this "UWP deprecation". Unlike some of the other deprecations (WPF/Silverlight) there aren't really any changes to the XAML format either: WinUI 1 and WinUI 2 were the names of different stages and UWP UI frameworks, and WinUI 3 lifts all of it out of UWP's app lifecycle sandbox and almost all of it out of components that ship with Windows itself (and thus only update with Windows feature releases) to libraries that applications can ship themselves with their own update cycles (to any supported Windows version, including limited Windows 7 support and Windows 10 support all the way back to the first Anniversary Update). More so than any of the other transitions/deprecations, this is a "simple" version upgrade 2 -> 3 from the UI/XAML standpoint (though with the semver major implication of some compatibility breaks). (It's the app lifecycle stuff that is most broken in this transition. Though even then there are transition options.)
All of that is tied together with much greater WinRT bindings/"projections" for many languages without custom language extensions (nor deep language runtime dependencies) and the ability to use far more components in existing "brownfield" Win32 apps such as dropping in entire XAML files as if they were a Win32 control, or vice versa supporting needing to bury an old Win32 control in the middle of a XAML stack somewhere to keep using an old but not broken component.
The team that pushed it over C++/CX, brought back ATL style development, without any kind of IDL tooling support on Visual Studio, and after C++ files get generated by the XAML and midl compilers, it is on us to merge the files manually.
Whereas C++/CX provided an experience similar to C++ Builder or Qt, but politics, and now it is deprecated, while C++/WinRT team seems to be quite happy reliving the ATL/WRL experience.
Honestly I don't understand why anyone would write a Windows-specific app these days. Windows seems to have actually lost interest in high level languages over time. Seems like they have renewed their love affair with C++ and that's the "future" now.
The current approach C++/WinRT despite retaining the weird IBM-esque use of a slash, is mostly "just" an IDL precompiler and bundle of macros intended for use with "modern" C++ (I believe it needs C++17 support or higher).
«Can you mix C++/WinRT with normal portable C++? Can you use GCC or just MSVC?»
That is one of the supposed advantages of/reasons for C++/WinRT over C++/CX. I've heard offhand mentions on blogs of using clang with C++/WinRT. I'm not a C++ developer and have no idea how well that works in practice.
«Windows seems to have actually lost interest in high level languages over time. Seems like they have renewed their love affair with C++ and that's the "future" now.»
I think that is related with pjmlp's complaint above with C++/WinRT (versus the older C++/CX) is that it does feel a lot like going back to the bad old days of MFC and (especially) ATL. The "WRL" templates library of C++/WinRT from my understanding is intentionally designed a lot like ATL. I can appreciate that Windows developers with a lot of C++ Win32 experience and massive brownfields of C++ Win32 apps like it much more for exactly those sorts of reasons: it looks/acts/smells a lot more like 90s COM, there's less relearning, there's far more interoperability with existing code structures/patterns/compiler choices (beyond the "need to upgrade to at least C++17").
I wouldn't necessarily phrase that as Windows seeming to have "lost" interest in high level languages. On the one hand I don't think "Windows" has ever really cared about high level languages in one way or another. That's as much "the Fall of the House of Longhorn" story as any other: the infighting between core Windows which has always been C++ and seemingly likely always will and the Developer Division trying to prioritize Developer Productivity and higher languages especially via .NET doing as much damage to Longhorn's goals as any other reason for slips/delays/production issues.
In all those fights .NET still exists and higher level languages still have a seat at the table. (Though JS got knocked out late in Windows 8 from having a direct WinRT story and subsequently/relatedly Electron is winning. Though React Native is sort of making a stand. Sort of.) Of course even .NET at this point seems to think that Windows-specific apps are on the way out and there's seemingly a lot more focus on MAUI and cross-platform apps than WinUI apps.
However it basically goes like this, you edit the IDL files with the same editing capabilities as if you were in Notepad, because to this day they still haven't bothered to add syntax highlighting or code completion to IDL files editing experience.
Then to top that, your C++ files get generated, and then it is up to you to track down the changes between the newly generated code and the last time you edited the IDL files. So you manually merge that generated code into the C++ files of your project.
Naturally a wonderful experience to those of us on .NET that occasionally need to deal with C++.
You are right regarding high level languages on Windows, the political might of WinDev means that something like iOS with Swift, or Android/Kotlin, where C and C++ play a minor role, will never happen.
Every time .NET gets a bit more of focus, they spoil the fun.
Interesting fact, the new context menu for Windows 11 requires a COM implementation to add entries for your application.
It shouldn't be a surprise that extensions to it still use COM (extensions to File Explorer have always used COM). Especially because these new COM interfaces for Shell Extension have been added retroactively all the way back to Windows 7. (The new ones differ from the old ones in providing more data to Windows for grouping/merging the extensions into submenus than previously supported.)
[1] Random image search example: https://cdn.mos.cms.futurecdn.net/LNbaeoqJymdkQ3uSK7MeKY-970...
(ETA: Useful blog post: https://blogs.windows.com/windowsdeveloper/2021/07/19/extend...)
(And its SP5, not SP6)
https://en.m.wikipedia.org/wiki/Manu_Cornet#/media/File%3A%2...
Press x for doubt.
In my personal experience, and that of colleagues, it was a pretty smooth experience. We mostly had issues due to some API changes here and there, and of course ASP.NET
Someone has to pay for the contracting project to do that.
Also Microsoft themselves have stuff that is .NET Framework only on VS plugins, SharePoint, Dynamics and SQL Server.
Outside of UI components which MSFT is getting to, they’ve worked very hard to make the transition as easy as possible.
If anything, the backwards compatibility has led to making some things worse, IMO, e.g. switching from the simple JSON based project file format they had to the XML based .csproj style one, which I’m pretty sure was done to be able to support .Net framework projects.
Back in .NET Core 2.1 days, I had a two months project to port an application from .NET Framework into Java and deployed into Red-Hat Linux, because if a rewrite was required, then better away from Microsoft ecosystem, as this specific company already had enough from rewrites.
This is how well some customers have been taking the .NET Framework => Core migration.
https://github.com/microsoft/WindowsAppSDK/discussions/1615
My arguing for UWP has been long, time to assume defeat and eat my hat, I really don't get how they managed to mess this worse than Vista.
Win32 => WinRT (8) => UAP (8.1) => UWP (10) => sorry guys back to Win32.
Plus the corpses from anyone that invested into .NET Native or C++/CX.
Also let not fool that HoloLens or XBox still use UWP, HoloLens is now using OpenXR/Unity, and XBox has released GDK (Win32 based).