Live data from Hacker News

Ask HN: What is the best way to build a desktop app in Windows in 2023?

news.ycombinator.com

61–70 of 107 posts

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#61
post #26

Earlier quoted context omitted.

It's a shame that, unlike with Win32, using WinUI places pretty harsh restrictions on which programming languages and environments you can use. Only C# and C++ are supported, the latter only with Microsoft compilers. For everything else, including Rust[1], Python and MinGW C/C++, there is no answer for OP's question, and the effect of this on the visual consistency of the Windows desktop is obvious - there is none. E…

Not to mention that WinUI is not supported on Windows Server. Therefore, if you need to deploy to server and desktop environments, it's better to stay with WinApi (WinForms) or WPF.

It isn't? That seems cripplingly stupid.

WinForms is very old and doesn't do DPI, but one thing I like about it is that it always works.

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#62
post #8

Without more details, this is the way to get the most native Windows 11 look and feel: https://learn.microsoft.com/en-us/windows/apps/winui/winui3/ Disclosure: I work at Microsoft on a team that works on visual look and feel for Windows.

No visual designer. I'm sorry, but this is a massive step back in usability. I'm not moving from a system where I can drag/drop UI elements into place to one where I can't.

Absolutely this. So much this. I dont give a shit about how modern you want the look and feel of everything to be. Sometimes I just need to not spend weeks pulling out my hair trying to wrap my head around something so basic and simple as a UI. Even VB 6 had ways to make stuff scale. Can't be that hard.

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#63

To make an app with the same "nativeness" as the "Settings" app, you need to use UWP, or WinUI 2.7+. But not 3.0+.

.. however, you're then stuck in the UWP sandbox, I believe?

(edit: crucially I don't think you can use either of those with dotnet core?)

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#64
post #8

Without more details, this is the way to get the most native Windows 11 look and feel: https://learn.microsoft.com/en-us/windows/apps/winui/winui3/ Disclosure: I work at Microsoft on a team that works on visual look and feel for Windows.

.. and how many of the Microsoft applications actually use WinUI3? As far as I can tell they're doing their own thing (Office) or are Electron (Teams) or, at least in Windows 10, haven't actually been updated from WinForms.

The overhead of WinUI3 is pretty huge. The visual designer, a winning feature of Visual Studio for decades, is AWOL. Why? It's XAML, the same as the previous XAML designer! It's just .. broken?

The backward compatibility story is a disaster: you can get stuck in the UWP sandbox https://github.com/microsoft/WindowsAppSDK/issues/1780

What's the big Microsoft WinUI3 flagship app, then? Something people are actually using? Rather than just a few system dialogues. (How many Win11 settings pop up a Win32 dialogue box, still?)

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#65
post #36
post #14

Looks like MFC is still a thing.

Definitely, that would also be a solution, but how risky is to bet on it?

I don't think they can kill it, ever. On the other hand, it looks old, and you'll forever have DPI awareness misery for cases like "two monitors with different resolutions".

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#66
post #64
post #8

Without more details, this is the way to get the most native Windows 11 look and feel: https://learn.microsoft.com/en-us/windows/apps/winui/winui3/ Disclosure: I work at Microsoft on a team that works on visual look and feel for Windows.

.. and how many of the Microsoft applications actually use WinUI3? As far as I can tell they're doing their own thing (Office) or are Electron (Teams) or, at least in Windows 10, haven't actually been updated from WinForms. The overhead of WinUI3 is pretty huge. The visual designer, a winning feature of Visual Studio for decades, is AWOL. Why? It's XAML, the same as the previous XAML designer! It's just .. broken? Th…

File Explorer is using it. Much of the Windows 11 shell, including the taskbar, Start menu, Settings, notifications, and Microsoft Store is using WinUI 2 (only because WinUI 3 wasn’t ready at the time). Even apps like Notepad, Paint, Sound Recorder and Media Player use WinUI.

WinUI 2 and WinUI 3 currently share the same look and feel but new apps should use WinUI 3.

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#67
post #22

Qt: Not only do you also get builds for Mac and linux, but everytime MS updates .NET the Qt framework supports these changes so you don't have to.

Qt Widgets, unless you need a really quick turnaround time. Just beware the commercial license, apparently it can't be used with FOSS.

You also need to do extra work to build in slots and signals, which tou don't need to do with many, many other frameworks. If tou don't put the extra work in learning that stuff, and it does require effort to learn, then you wind up with an application whose interface locks up if it's doing anything non UI related between UI calls.

QT is great, until it's not, then it sucks.

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#68
post #8

Without more details, this is the way to get the most native Windows 11 look and feel: https://learn.microsoft.com/en-us/windows/apps/winui/winui3/ Disclosure: I work at Microsoft on a team that works on visual look and feel for Windows.

For someone coming back to Windows development after 5+ years, it is so incredibly difficult to figure out what is going on. I have never had so much confusion in my life. WinUI 2, WinUI 3, C++/WinRT, C#/WinRT, C++/CX, C++/CLI, WinRT (Windows Runtime - that's not a runtime), COM, C++ Win32, C# .NET, UWP, Fluent, Metro, .NET MAUI, PWA, React Native for Windows, WPF, Windows Forms, Windows API, Windows App SDK (which i…

Let me make it easy for you, if you want it to look and feel native on Windows 11, use WinUI 3.

ChatGPT gives a decent summary of the history of all that:

https://chat.openai.com/share/6478dcdd-98d3-449a-84be-be5666...

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#69

Microsoft is using React Native for Windows [0] for their Office applications [1]. As a fan of RN this would be the first avenue I’d explore if I had to develop something for Windows. [0] https://microsoft.github.io/react-native-windows/ [1] https://microsoft.github.io/react-native-windows/resources-s...

Facebook Messenger uses React Native.

WhatsApp Desktop uses WinUI.

WhatsApp is superior.

I don't get React Native. It's such a huge, complicated abstraction with no ability to performance tweak. I don't understand how a company as big as Facebook doesn't have enough resources to build native apps for each platform. These UIs are the simplest app you could build as well.

Re: Ask HN: What is the best way to build a desktop app in Windows in 2023?

#70
post #35

I will still place my bet for C++ combined with a third party UI Framework. I know that Qt has changed its license model, but it offers many capabilities and is battle-tested enough. Otherwise another shot could be a Java/JavaFX application, possibility compiled natively or packaged with jpackage, so you deliver your own tailored JVM, without requiring the installation of a JRE on the user system. Another way would b…

I don't get how MS can't just build a control library. You always have to use these expensive third-party closed-source libraries.

I remember when the Ribbon UI came out. And there were like 10 different vendors making all different ones, each with a different look and feel.

Just like Amazon took internal services and made them exposable in AWS, so should Microsoft with every UI component they build. You shouldn't be able to ship any UI internally, unless you make it publically accessible. I guess WinUI 3 is heading in these direction by decoupling from the OS. But boy it took a lot of time!

Post reply on HN