zlacker

[parent] [thread] 20 comments
1. wvenab+(OP)[view] [source] 2023-05-24 16:36:07
If Microsoft would make it easy and free to package apps (and without combining it with sandboxes) all developers would do it.
replies(2): >>gjsman+L1 >>alkona+77
2. gjsman+L1[view] [source] 2023-05-24 16:42:43
>>wvenab+(OP)
I really doubt that at this point. Developers have learned that everything Microsoft says to do for Windows, since 2012, will be garbage within a few years. Guaranteed.

Learned Silverlight for Windows Phone development? Too bad, it's UWP now. And the XAML is incompatible.

Learned WinRT for Windows 8/8.1 app development? Too bad, it's UWP now. And the XAML is incompatible.

Packaged your App for APPX? Too bad, it's MSIX now.

You learned how to develop UWP apps? Too bad, the User Interface layer has been ripped out of UWP, it's now called WinUI 3, and it doesn't even run on UWP. Better port your UWP app back to Win32 now, I guess. Why did you even learn UWP again?

You went and learned WinUI 3 like we recommended? Well, unlike WinUI 2, it doesn't have a visual designer, and it doesn't have input validation, or a bunch of other WinUI 2 features. So, depending on what your app needs, you might have a mix of UWP and Win32, because WinUI 2 is UWP-exclusive and WinUI 3 is Win32-exclusive and neither has all the features of the other. Progress!

You built your Windows 8 app with WinJS? Well, sucks to be you, rewrite it in entirety, WinJS was scrapped.

You ported your app from iOS with Project Islandwood? Well, again, that sucks. It was brilliant, it made pulling apps over from iOS much easier, but it's dead. Rewrite!

You decided to hang it all, develop for good old WPF, but wanted to use the Ink Controls from UWP? Great, we developed a scheme for that called XAML Islands which made so you could have some of the best UWP controls in your old app. Then we released WinUI 3, completely broke it, and made it so complicated nobody can figure it out. So broken; even the Windows Team doesn't use it and is writing the modern Windows components for File Explorer with the old version.

But of course, that would require WinUI 2, for UWP, inside Win32 which is the main feature of the broken WinUI 3; which means that the Windows Team has a bastardized version of XAML Islands for their own use that nobody else has (literally), to modernize the taskbar and File Explorer and built-in apps like Paint, that nobody who wants to emulate them can borrow. Their apps don't look modern and their users complain? Suckers, go learn WinUI 3, even though our own teams couldn't figure it out.

You wanted your app on the Microsoft Store? Well, good news, package it together with this obtuse script that requires 30 command-line arguments, perfect file path formats, and a Windows 10 Pro License! Oh, you didn't do that? Do it 5 years later with MSIX and a GUI this time! Oh, you didn't do that? Forget the packaging, just submit a URL to your file download location. Anyone who bothered with the packaging wasted hours for no real purpose.

Did I mention Xamarin? A XAML dialect of its own, that supports all platforms. But it runs on Mono instead of the authentic .NET, so you'd better... work around the quirks. Also it's called MAUI now, and runs on .NET now. But that might break a few things so hang around for over a year's worth of delays. We'll get it running for sure!

Oh, and don't forget about ARM! The first attempt to get everyone to support ARM was in 2012 with a Windows version called... No, no, no. Go past this. Pass this part. In fact, never play this again. (If you want to imagine pain, imagine running Windows and Microsoft Office on a ARM CPU that came three generations before the Tegra X1 in the Nintendo Switch. Surface RT ended with a $900M write-off.)

And so on...

Or, you could just ignore everything, create a Windows Forms (22 years strong) or WPF app (17 years strong), and continue business like usual. Add in DevExpress or Telerik controls and you are developing at the speed of light. And if you need a fancier UI, use Avalonia, Electron, React, or Flutter.

replies(9): >>hammyh+k4 >>mey+68 >>kitsun+d9 >>bashme+Ac >>pjmlp+Tf >>OkGoDo+hi >>batty_+Z21 >>tracke+7g1 >>Dalewy+gk1
◧◩
3. hammyh+k4[view] [source] [discussion] 2023-05-24 16:53:04
>>gjsman+L1
This sums it up perfectly. It's fatiguing.
replies(1): >>winpho+q9
4. alkona+77[view] [source] 2023-05-24 17:03:50
>>wvenab+(OP)
It's a black art (e.g. Windows Installer). But these days using open tools it's not so bad. A desktop app can be built early with only free microsoft tools and really well packaged with free non-microsoft (ok microsoft-adjacent) tools like Squirrel. That wouldn't make them isolated in the sense of store apps, however.
replies(1): >>jasomi+Qw1
◧◩
5. mey+68[view] [source] [discussion] 2023-05-24 17:06:41
>>gjsman+L1
Everytime I ponder getting into Windows desktop development I see a portion of this picture, think about doing all this in Java instead, then remember that that is its own UI mess (although overall less storied but worse functionality wise), then think Electron would be better, try to get Typescript and Vue.js to play nice in Electron, run for the hills, briefly consider if building a desktop UI in Unreal or Unity would be the easiest, then just go back to playing video games.

Edit: Thank you for giving such a nice summary of the current landscape of UI dev in Windows native development.

replies(5): >>derefr+2b >>toast0+Ub >>wvenab+Yc >>mike_h+ae >>int_19+sv1
◧◩
6. kitsun+d9[view] [source] [discussion] 2023-05-24 17:10:23
>>gjsman+L1
And to top it all off, even WPF has quirks. I can tell which apps on my Windows gaming tower are built with it because for some reason the framerate on my cursor drops to 60FPS or below on my 240hz monitor when it's within the bounds of a WPF window.
replies(1): >>rstat1+Th
◧◩◪
7. winpho+q9[view] [source] [discussion] 2023-05-24 17:11:42
>>hammyh+k4
It's also (at least partially) intentional. Microsoft keeps you so busy on the treadmill you don't stop to ask "wait, should we be doing this?"
replies(1): >>wvenab+Bc
◧◩◪
8. derefr+2b[view] [source] [discussion] 2023-05-24 17:18:07
>>mey+68
You know how Electron allows you to spawn a native backend server as a subprocess, to generate the pages that the Electron frontend interacts with? And how this means that you can write 90% of your program in some native language, and just do a thin UI in JS?

I wonder why nobody's created a "XAML projector" to allow you to create Windows UI applications the same way — by writing some platform-neutral app in Java or whatever, that needs no native libs loaded into it, but rather just knows how to generate XAML and, when told it's running on Windows, expects to be connected to over a socket by an also-XAML-speaking client.

Or I could say the same about Qt's QML.

(In fact, at this point I have to wonder: if modern UI frameworks almost always use an intermediary "view definition language" to communicate with the application anyway, then why are they even designed to load as native libraries resident inside the process? Why not just reinvent the X protocol on a higher level — have the UI toolkit be a local (socket-activated) daemon, and then all the things that use it are just clients that speak its protocol? I know, you can't directly draw to the screen from your backend this way. X11 DRI worked, though, and IMHO was a very good idea — SHM buffers are way easier to get working in most language runtimes than an FFI binding of some C++ UI toolkit is. Or maybe we can do one better, these days: just expose WebGL commands addressable to WebGL canvas objects over the toolkit's protocol.)

◧◩◪
9. toast0+Ub[view] [source] [discussion] 2023-05-24 17:21:38
>>mey+68
If you want to do windows desktop development, just find the oldest technique that still works and use that. I think you can probably still find pre-.net visual studio out there and use it, and it'll work. You'll miss out on some stuff, but oh well? If you get to the point where you have thousands of people hounding you about high dpi support, you've made it.
◧◩
10. bashme+Ac[view] [source] [discussion] 2023-05-24 17:24:15
>>gjsman+L1
I can’t speak for professional development, but for hobby projects I personally had a lot of fun with WinAPI and GDI. SDL is good too. The churn of everything you mentioned was too much for me and it’s comforting playing with something that isn’t going anywhere for better or worse.
◧◩◪◨
11. wvenab+Bc[view] [source] [discussion] 2023-05-24 17:24:26
>>winpho+q9
Microsoft's goals and 3rd party developer goals stopped being aligned and it's taken just about this long for them to realize that it isn't going to work.
◧◩◪
12. wvenab+Yc[view] [source] [discussion] 2023-05-24 17:25:54
>>mey+68
Most developers completely ignored everything Microsoft had to offer since Windows 7 and because Microsoft is Microsoft all their technologies continue to work and keep getting updated.

I, for one, never stopped developing in WPF.

◧◩◪
13. mike_h+ae[view] [source] [discussion] 2023-05-24 17:30:56
>>mey+68
JVM UI isn't so bad. I've written some pretty modern looking UI with it. The sophisticated controls are all there.

Modern JavaFX theme: https://github.com/mkpaz/atlantafx

Modern Swing theme: https://github.com/JFormDesigner/FlatLaf

And these days Compose Multiplatform: https://www.jetbrains.com/lp/compose-multiplatform/

I tend to use Kotlin rather than Java but of course Java is perfectly fine too. You can also use Clojure.

If you use any of those frameworks you can distribute to Win/Mac/Linux in one command with Conveyor. It's free for open source apps and can do self-signing for Windows if you don't want to pay for the certificates or the Store (but the Store is super cheap these days, $19 one off payment for an individual). Also supports Electron and Flutter if you want to use those.

From those frameworks you can then access whatever parts of the Windows API you want. Flutter even has WinRT bindings these days! So it's not quite so bad.

◧◩
14. pjmlp+Tf[view] [source] [discussion] 2023-05-24 17:40:11
>>gjsman+L1
You missed .NET Native and screwing devs replacing C++/CX with C++/WinRT, the return to ATL roots, editing IDL files without VS tooling and manually merging generated C++ code.

But hey, from all the warts, and screw-ups, the other gardens aren't much better.

◧◩◪
15. rstat1+Th[view] [source] [discussion] 2023-05-24 17:50:38
>>kitsun+d9
That's the power of the horribly unoptimized DX9-based renderer WPF was (is still?) built on.

Worst part of WPF for me was the tooling that crashed whenever you so much as looked at it wrong.

◧◩
16. OkGoDo+hi[view] [source] [discussion] 2023-05-24 17:51:53
>>gjsman+L1
Exactly my experience with Microsoft development. Since 2011 I’ve gone from working at Microsoft on Windows Phone full time to mostly leaving the tech industry and running a theater, largely because I bet on the Microsoft horse and it turns out that was a losing bet for exactly these reasons. I stopped trying to keep up, because what’s the point? When I do still make programs using C#, they are generally command line or Windows Forms, and intended for my personal use.
◧◩
17. batty_+Z21[view] [source] [discussion] 2023-05-24 22:22:23
>>gjsman+L1
Thank you for summarizing why I left Windows app development and haven't looked back
◧◩
18. tracke+7g1[view] [source] [discussion] 2023-05-24 23:47:34
>>gjsman+L1
And people wonder why devs will reach for Electron... same tooling as web-apps, rich UI/UX with support for scaling and accessibility, and bonus, you can also target mac and even linux with a relatively low level of extra effort.

Avalonia, React (Native) and Flutter all seem to be doing pretty well as alternatives as well. All with cross platform support and less friction than the Microsoft solution(s) for this. That MS didn't support MAUI with at least Linux+GTK/Gnome from the start, who knows, it was a massive miss for a lot of devs imo.

◧◩
19. Dalewy+gk1[view] [source] [discussion] 2023-05-25 00:17:31
>>gjsman+L1
This really comes down to Microsoft's desire to kill off Win32 and developers' and users' desire to keep using Win32 coming to a head.

As it turns out, Windows is nothing without Win32 which developers and users want. Consequently, Win32 has subdued every single attempt from Microsoft to replace it. Every. Single. Attempt.

The recent moves back to Win32 are essentially Microsoft finally throwing in the towel, though the jury is still out if they understand why Win32 keeps on slaying them at every turn.

◧◩◪
20. int_19+sv1[view] [source] [discussion] 2023-05-25 02:14:52
>>mey+68
Thankfully WinForms and WPF are still around and supported in current dev tooling.
◧◩
21. jasomi+Qw1[view] [source] [discussion] 2023-05-25 02:30:08
>>alkona+77
I actually like WiX[1] — it has a bit of a learning curve, but, so long as I'm building on Windows and don't stray far from the default UI flows, I haven't found an easier tool for creating Windows installers as part of a product build process, especially those that require Windows-specific bits like COM component registration, Windows service management, setting restrictive ACLs on installed components, etc.

And while I'm not aware of any way to sandbox Windows Installer itself, I'm curious if AppContainer isolation can be applied to applications and services installed via MSI, which would still be quite useful even if the installation process itself is unrestricted.

Alternatively, now that MSIX supports service installation[2], I wonder whether an MSIX including a Windows service and a collection of client applications can be configured so everything runs within one AppContainer, isolated from the rest of the system, and whether permission to access specific external directories chosen by users in a configuration GUI can be transparently (to the user) delegated to the related service.

Alas, none of this is useful to me unless it's compatible with at least the most recent version of Windows 10: very few of my customers are running Windows 11, and I suspect many won't upgrade until Windows 10 is no longer supported (optimistically; as of last year, I was still getting occasional support requests from customers running older versions of our software on Windows Server 2003 R2).

[1] https://wixtoolset.org

[2] https://learn.microsoft.com/en-us/windows/msix/supported-pla...

[go to top]