Live data from Hacker News

Microsoft Throws in the Towel on UWP, Elevates Win32

extremetech.com

71–80 of 104 posts

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#71
post #32

About 7 years too late. This thing should have been drowned in the bathtub when it was called WinRT. An excellent example of the hubris of the Windows division, leading to the demise of Windows Phone (and Windows in due course). The genius who convinced Microsoft to throw its weight behind an API completely incompatible with everything they had done before should be lauded for chutzpah. They couldn't have done a bett…

Ideologically, I'm opposed to the assertions you've made in these two paragraphs primarily because the bloat and backwards compatibility requirements made innovation more difficult given the diversity of hosts which had to be supported. But I'll acknowledge that I've got a substantial bias here considering I both keenly observed and to a very modest extent contributed to external coverage of the development of the pl…

To be honest, I'm completely of the opposite opinion. Backwards compatibility means I don't have to rewrite anything again and again and again.

Compare with gtk, which breaks backward compatibility liberally. After a few versions, old applications stop working unless someone takes the time to fix them. This means application progress is reset again and again. We lose tons of old code for no good reason. OTOH, the old tools written in win95's win32 or in x11's xlib (or posix, mother of all stable APIs), still work 20 years later. This means you can focus on improving instead of rebuilding.

Don't get me wrong: Backwards compatibility is a cost. But I'd rather have to pay it once, centrally, instead of distributed over all applications. Very rarely you can deprecate and fix a small part. But in general, libraries are the ground upon which applications are built. That ground should be stable.

BTW, I fear the damage wayland will do to the linux ecosystem.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#72
post #28

Earlier quoted context omitted.

If you read the article, it doesn't sound like anything is being abandoned, so I'm not sure how your comment is relevant here. MS does have a tradition of abandoning products (like some other infamous tools vendors) but UWP isn't being abandoned according to the article.

I think we have distinguish between UWP as UI toolkit and UWP for as library for system functions. The latter will stay but I am really doubtful about the former. I don't know of any aspect where UWP UI ie better than WPF or Win32 so I doubt it will get more than the little adoption it already has.

WinUI is actually open source, and WinUI 3.0 will open-source all XAML controls, XAML Stack and Composition.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#73
post #59

Earlier quoted context omitted.

WinUI is just a new name for the UWP UI stack now that it is open source and decoupled from the OS, React Native is a wrapper on top of UWP/WinUI, and WPF isn't really getting significant new features other than being taken open source and ported to .net core. So really already there's just one forward-looking native UI stack, which is WinUI.

Maybe, but how does that square with the widespread assumption that UWP and the store are basically dead? Do you expect WinUI to be available in desktop apps eventually? There’s something called “XAML Islands” to integrate UWP components into desktop apps, but that’s technically ugly, incomplete, and very explicitly targeted at legacy applications. Beyond that, they didn’t announce anything as far as I can tell.

Windows Terminal will be distributed on Store, and so do new Edge. I don't know why people are calling it dead...

And they announced that WinUI 3.0 will open source all built-in XAML controls (they are even rewritten some to be on top of Composition because of that), will also open the XAML Stack and Composition.

This is a big deal.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#74
post #12
post #6

How do they expect desktop developers to bet on anything MS does? Since .NET came out they constantly keep changing direction without any cohesive strategy. The server development strategy looks pretty good with MVC and now Core. But desktop development is just terrible. If I have to write a new app I will either think about making it web based or maybe use qt but I think I will avoid any MS UI toolkit.

It's simple. You wait for five years before you start developing in any given technology. By that time it will either have been substituted or polished. UWP was a clustefuck from the beginning, especially after everyone realized that MS intended to give-up on mobile. There aren't many people who bought into it and given Microsoft's infamous support for legacy code it's no surprise that they decided to tank it. Bottom…

Suppose I'm going to add simple Windows gui for an app today, what should I use out of > 5 year old technologies? WinAPI in classic way, using Petzold's "Programming Windows, 4th edition" as a guidebook? WinAPI wouldn't be enough, I suppose, so can I use at least Comctl32 or is it deprecated? Should I use MFC? ATL? COM? Or should I use WinForms with .NET? Even if my app is written in native code? Isn't it for "business apps" only? Can I use it to write another Winamp?

I'd probably choose Qt.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#75
post #10

Earlier quoted context omitted.

COM isn't C++. It's a language independent interface. There's no reason why COM (and therefore UWP) can't be used from C.

It can be used from C but is a huge pain that makes it obvious whoever designed the interface (or COM in general) really went off the deep end with the abstraction level. There's a major difference between a C API designed to be used from C (Win32, POSIX) and one that only happens to be usable from C. Compare a sane "C API designed to be used from C": https://docs.microsoft.com/en-us/windows/desktop/dlgbox/usin... th…

It’s funny that they use that awful pyramid-of-doom error handling style in a lot of the public documentation.

The correct way is to have an “Error:” label at the end of the function before all the cleanup code. After calling any function that can return an error code, you check the error code and “goto Error” if necessary. You can encapsulate that whole logic in a macro so you just call something like CHK(hr) anytime you have an error code to check. CHK being defined as something like “if(FAILED(hr)) goto Error;”. This is how error handling for non-trivial functions is done in any serious C code, regardless of the platform. One common pattern is actually to just put the entire line of code inside the macro, so your code would look like CHK(hr = AWin32Function(param1, param2)). You can get real cute and even have the macro assign hr for you, so you can drop the “hr =“ from your code.

I worked on Windows at Microsoft and with very few exceptions, the only time I saw the pyramid-of-doom was in the public documentation. I wonder if was just bowing to the irrational hostility some people have to any use of goto, even though this is a highly structured pattern that should be uniform across your codebase, the opposite of unstructured, ad-hoc uses of goto that are the actual problem.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#76
post #59

Earlier quoted context omitted.

WinUI is just a new name for the UWP UI stack now that it is open source and decoupled from the OS, React Native is a wrapper on top of UWP/WinUI, and WPF isn't really getting significant new features other than being taken open source and ported to .net core. So really already there's just one forward-looking native UI stack, which is WinUI.

Maybe, but how does that square with the widespread assumption that UWP and the store are basically dead? Do you expect WinUI to be available in desktop apps eventually? There’s something called “XAML Islands” to integrate UWP components into desktop apps, but that’s technically ugly, incomplete, and very explicitly targeted at legacy applications. Beyond that, they didn’t announce anything as far as I can tell.

Maybe, but apps are already using XAML Islands - the new Windows terminal does its entire UI in one big XAML Island. There's talk of a new XAML Desktop project/app type that would basically formalize this pattern: https://twitter.com/pag3rd/status/1126940080294154241

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#77
post #36
post #23

Earlier quoted context omitted.

Without a language that wraps the naked COM calls it's truly a nightmare. Using COM from C# is pretty OK and VB6 was great too. C++ is worse. To me COM is like an assembly language for interop that needs to be wrapped with higher language constructs. You could probably write a few C macros to reduce the boilerplate code a lot.

ATL and WTL are such bunches of macros actually, but for C++.

ATL yes, I think WTL is macros around Win32.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#79
post #74
post #12

Earlier quoted context omitted.

It's simple. You wait for five years before you start developing in any given technology. By that time it will either have been substituted or polished. UWP was a clustefuck from the beginning, especially after everyone realized that MS intended to give-up on mobile. There aren't many people who bought into it and given Microsoft's infamous support for legacy code it's no surprise that they decided to tank it. Bottom…

Suppose I'm going to add simple Windows gui for an app today, what should I use out of > 5 year old technologies? WinAPI in classic way, using Petzold's "Programming Windows, 4th edition" as a guidebook? WinAPI wouldn't be enough, I suppose, so can I use at least Comctl32 or is it deprecated? Should I use MFC? ATL? COM? Or should I use WinForms with .NET? Even if my app is written in native code? Isn't it for "busine…

There is no clear choice in windows desktop anymore. Only obsolete or soon to be obsolete options. If I had to do it now my first choice would be to go web based, then qt or WPF. Electron looks very appealing too. Pretty sad but it looks like MS doesn’t care about the desktop much anymore.

Re: Microsoft Throws in the Towel on UWP, Elevates Win32

#80
post #28

Earlier quoted context omitted.

I think we have distinguish between UWP as UI toolkit and UWP for as library for system functions. The latter will stay but I am really doubtful about the former. I don't know of any aspect where UWP UI ie better than WPF or Win32 so I doubt it will get more than the little adoption it already has.

WinUI is actually open source, and WinUI 3.0 will open-source all XAML controls, XAML Stack and Composition.

But when will MS lose interest in this too and do something else? I don’t think it can live as open source without a lot of MS support.
Post reply on HN