9 ms·
Microsoft Throws in the Towel on UWP, Elevates Win32
- userbinator 8y agoDiscussed yesterday on a different article: https://news.ycombinator.com/item?id=19873198 https://news.ycombinator.com/item?id=19873198
- monocasa 8y agoThank god. Among other things UWP didn't allow PAGE_EXECUTE on the memory mapping calls, meaning that JITs were disallowed. That's pretty core to general purpose computing in a real way, IMO.
- seanmcdirmid 8y agoThe DLR was nerfed because of this: no JIT, just interpreted. Really slowed down my live programming implementations. Also, I remember deploying some code to a surface Hub, my C# build for that took 40 minutes to an hour. Not fun. On the other hand, it did make me learn some web development to do UIs.
- bpye 8y agoI believe this was true at one point, but isn't any more. Whilst you cannot allocate executable memory, you can use VirtualProtectFromApp to remap memory as executable [1]. UWP does enforce W^X though. You do need the codeGeneration capability. (Disclaimer, work for Microsoft - made LuaJIT run on UWP in my free time, this definitely works :) ) [1] - https://docs.microsoft.com/en-us/windows/desktop/api/memoryapi/nf-memoryapi-virtualprotectfromapp https://docs.microsoft.com/en-us/windows/desktop/api/memorya...
- MaulingMonkey 8y agoVirtualProtectFromApp has the exact same signature as VirtualProtect, just supporting fewer constants and being legal in UWP apps. I don't suppose you have any insight as to why Microsoft forced this kind of API churn? Why I have to lace my code with #ifdef s to support both UWP Apps and earlier OSes? What's the upside? I feel like VirtualProtect could've just supported fewer constants inside the sandbox. Maybe to limit sandbox attack surface? Or working around KnownDLLs pinning perhaps? But even then, why not provide forwarding stubs instead of forcing all UWP devs to write their own or #ifdef spam? Time constraints before shipping Windows 8? This style of API churn - not limited to VirtualProtect, and often with only newfangled COM C++/CX bindings for replacement APIs - definitely put me off UWP App dev, and I just don't see what the upside was supposed to be for anyone. Lots of extra work, mostly just to lose functionality.
- jdsully 8y agoBecause the UWP code under the hood calls the real VirtualProtect. It’s to avoid the name conflict. Fun fact: your UWP app also links in gdi.dll and user32 as well.
- Wowfunhappy 8y agoiOS also disallows JIT’s. I’m not saying this is okay, but it is quite clearly possible to have a successful software platform without them. (Excluding the platform-holder’s own JIT’s, of course.)
- umanwizard 8y agoiOS is not really “general-purpose computing”.
- Wowfunhappy 8y agoHow do you define "general-purpose computing", then? DVD players, microwaves, and even game consoles are single-purpose computing devices, designed to do one thing. I'm having a lot of trouble putting iPhones and iPads in that category. As terribly locked down as they are, they're still very much "general purpose". And BTW, I think Microsoft's goal was quite clearly for UWP to be as locked down as iOS.
- umanwizard 8y agoWell, it’s a spectrum. Microwaves < Game consoles < iPhones < laptops/desktops. I’d only call the last element of that chain “general-purpose” — to me, one requirement for earning that label is the ability to write and compile programs. If I can’t write iOS apps from inside iOS, it isn’t general-purpose.
- codeflo 8y agoI watched the videos for every session from the current Build conference I could find on this topic, but still don’t understand the strategy. Like at all. Listing the GUI toolkits that Microsoft is currently investing in, there’s UWP, WPF, React Native and also a new thing called WinUI. Not all of them will survive (by which I mean will continue to get significant new feature releases say three years from now). So it’s not clear to me at all why I should bet on any of them and not just use Electron, which is in a lot of ways worse, but at least guaranteed to stick around.
- contextfree 8y agoWinUI 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.
- codeflo 8y agoMaybe, 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.
- vitorgrs 8y agoWindows 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.
- MikusR 8y ago
- kitsunesoba 8y agoWin32‘s continued popularity (vs UWP) I’m sure has at least partially to do with how it’s all plain C, which makes it simple to support with any programming language imaginable via bindings. If they were serious about pushing UWP adoption they should’ve provided plain C bindings for it so it could be used with Rust or Python or Swift or whatever. C# and C++ aren’t everybody’s cup of tea.
- pcwalton 8y agoWin32 isn't plain C. Lots of Win32 functionality is only accessible via COM, which is C++ (though using only a small subset of features so as to achieve ABI stability).
- ChrisSD 8y agoCOM isn't C++. It's a language independent interface. There's no reason why COM (and therefore UWP) can't be used from C.
- deleted 8y ago[deleted]
- userbinator 8y agoIt 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/using-common-dialog-boxes#opening-a-file https://docs.microsoft.com/en-us/windows/desktop/dlgbox/usin... that involves nothing more than initialising a structure and calling a single function, with MS's "recommended replacement" using COM: https://msdn.microsoft.com/en-us/library/Bb776913(v=VS.85).aspx#basic_usage https://msdn.microsoft.com/en-us/library/Bb776913(v=VS.85).a... That is a ten level deep nested if with just as many function calls, to do essentially the equivalent of the code above. The first time I saw this, I seriously thought they were taking the piss.
- maxxxxx 8y agoHow 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.
- elorant 8y agoIt'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 line, my guess is that very few people will be hurt by this decision. They've all moved to greener pastures long ago.
- ungzd 8y agoSuppose 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.
- maxxxxx 8y agoThere 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.
- tonyedgecombe 8y ago
- Wowfunhappy 8y ago> One wonders what Gallo thinks Windows applications used to be called. > Regardless, the idea that consumers would shift their application acquisition behavior just because Microsoft wanted it was a poor idea that ought to never have been implemented in the first place. It’s good to see the company catching up to the place its customers never left. That just about sums it up for me. Good on Microsoft, I guess.
- neltnerb 8y agoI'm not quite sure I know enough to guess, does this suggest that new normal desktop applications may soon be able to take advantage of a unified upgrade mechanism rather than every program rolling their own?
- muststopmyths 8y agoAbout 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 better job of destroying Windows, if that was their goal.
- eganist 8y agoIdeologically, 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 platform reboots conceived during Longhorn/Vista/7/8 (Avalon/WPF, Indigo/WCF, WinFS, WinRT, some of which succeeded, some of which died) and the efforts to shed legacy platforms dating back almost three decades now. Why do you believe what you believe? Citations would be helpful, but I recognize we're discussing opinions.
- muststopmyths 8y agoFair enough. Let me lay this out as a long time Windows developer and someone who loved Windows Phone 7/8 compared to iOS and Android. 1. The first version of WP7 was fine. Silverlight was a pretty mature technology and there was developer interest (at least in the Microsoft ecosystem). 2. WP8 (and Windows 8) came out with WinRT. This was incompatible with existing ways of writing Windows code, so you couldn't bring (almost) any legacy code over. This means that extensive porting efforts were required for code that used to work fine on Win32. This was particularly brutal for open source libraries (like OpenCV/OpenSSL etc.) which were sorely necessary if you wanted to target all 3 mobile platforms. In addition there was a much smaller API surface. Bluetooth LE or VPN APIs for example never came out until too late. You couldn't even create COM ports (necessary for GPS dongles) in a Windows 8 (not mobile, just regular desktop) WinRT/UAP app. So Win32 applications would work just fine on Windows 8, but if you wanted they fancy new features, you were either SOL or had a long development cycle ahead of you. The forced async paradigm also added massive complexity for cross-platform development. They failed to see people rapidly losing interest in Windows (Charles Petzold's Windows 8 book sold so badly, he gave up on Windows for Xamarin. This is the guy who literally wrote the Bible of Windows GUI programming) and take action to remedy that. Instead, they spent time and effort on half-assing "Bridges" which they then rapidly lost interest in and stopped supporting. It's fine to try to shed legacy platforms, but you don't do it at the cost of developer traction, at the very moment when you need them most. They could have done a lot more to make it easier for developers to bring code over. MS OpenTech, for example, was a worthy initiative that again got killed too soon. So, my opinion is that nothing but hubris explains the decision to go down the road of abandoning Win32 at a time when Microsoft needed its developers more than anything else. Having worked at Microsoft way back in the day, I've seen many bad ideas get pushed out, but Microsoft always used to treat developers with respect. WinRT was just a massive slap in the face in comparison. *edited formating
- homero 8y agoSome of my apps moved to the app store but i couldn't use them on Windows 7. So i stopped using them and made sure to never use the windows store even if i get win 10 someday.
- rkagerer 8y agoFinally. It was a massive mistake from the get-go.
- mgamache 8y agoThe MS app store and UWP died with the death of Windows Mobile. UWP was MS' strategy to have a united mobile and desktop experience (just like Apple is trying to do now with OSX + iOS). No mobile == no incentive to develop UWP. There were already hacks for Win32 to use the non-UI APIs from UWP (that's a lot of acronyms) so you could already do most or the UWP stuff with Win32. The new strategy starting with UWP islands is just how they are staring to integrate the UWP offerings with WPF/Winforms officially. I like the UWP UI, but developing the apps is a pain due to the sandboxing (as compared with old Win32).
- philliphaydon 8y agoUWP isn’t dead??? It was demoed at build....
- pjmlp 8y agoMany naysayers love to use any misinformation to spread FUD, although it is clear from BUILD and MSDN, where all is going.
- glenrivard 8y agoMicrosoft appears to be throwing in the towel on a number of things. The big one is on browsers.