Live data from Hacker News

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

news.ycombinator.com

51–60 of 107 posts

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

#52
post #16

Delphi is probably the best, but I can't afford it. Lazarus is pretty good, except for the documentation, which needs a huge refactoring effort. You can put together small applications in minutes.

Delphi was quite good at Windows application development last time I used it, probably 2010. I'd probably stay away if you ever need to maintain it or hire people to use it. There's value in using a popular language with staying power.

> There's value in using a popular language with staying power.

That's a good point about popular languages, but you can't complain about Dephi's staying power. Wikipedia shows it as having been released in 1995, and it still seems to be going!

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

#53
post #26
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.

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…

It's really hard to use with Win32 / the traditional Windows API too. Often APIs aren't exposed or documented -- consider the APIs to turn on the Acrylic or Mica looks in a window background, for example. There are a few Github repos that show how to do it but using reverse engineered APIs or constants.

By comparison when Windows 7 was released, enabling glass was documented and usable from any language or framework.

It's also not currently possible as far as I know to mix new controls and old controls in one window very easily - there are islands, but they seem on the macro scale (from when I last looked.) This makes updating apps difficult: changing a UI is an all or nothing upgrade per window. You can't just easily add WinUI to an existing WinAPI window in an app using a non-C#/Microsoft language. So people who have existing apps or use a non-MS dev environment are faced with enormous barriers.

The ties to Microsoft languages and IDEs are also troubling. It's not technically MS-only, but it is _effectively_ MS-only.

This is my personal account (I don't have a professional HN account) but I work at a company that produces a dev environment and IDE, and we run into these issues. I find that searching for my HN username and LinkedIn ("vintagedave LinkedIn") will likely let any reader (the OP, any reader, or u/ fassssst if you'd like to get in touch?) find me, and I'd be happy to speak on a personal or potentially professional level about issues with WinUI and what could be done to make it more accessible across dev environments and more easy to convert to or upgrade to.

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

#54
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 is WinUI 3), VSIX, XAML, .winmd, WebView2.

When I think about macOS: Swift + SwiftUI, Swift/ObjC + AppKit.

This article was a huge read but helped me get an idea of things: https://arstechnica.com/features/2012/10/windows-8-and-winrt...

I think the issue is that the writers are trying to be too delicate to not make people feel like their apps are using legacy technology that will be deprecated.

> Many apps for Windows are written using WPF or Windows Forms, and they remain viable tools today...looking to the future....

There should be one obvious recommended way to build new apps, and all the other docs should be moved to a separate section.

And when I install Visual Studio 2022, it has a "Workload" called "Universal Windows Platform"...but I just read this is deprecated!!

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

#56
post #30

Earlier quoted context omitted.

This is a bit misleading. Only minor parts of Office are built with React Native, not the whole thing.

Teams is, and it's IMO the worst Office app available. I don't have time to get into all the reasons why right now because I need to sleep and it always leads to a 30 minute irl rant or a multiparagraph screed about the complete breakdown of their corporate work culture and terrible UI tooling that they can't fix a context menu rendering bug in their own damn "native" first-party corporate communications app when _Th…

Teams is react.js

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

#57
post #26
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.

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…

> Every third-party app uses a different toolkit with a different look and feel

This always infuriated me on Windows, and a big reason I moved to macOS.

This is a great read: https://arstechnica.com/features/2012/10/windows-8-and-winrt...

> ...the biggest problem is that USER [API] is essentially inextensible. If a developer wants to create, say, a menu that acts exactly like the standard operating system menu but with some small extra feature (for example, he might want to support the drag and drop, similar to the Favorites menu in Internet Explorer) he generally has no option but to reinvent the entire menu system from scratch.

Seems like the failure of the Longhorn project really messed things up. It was suppose to replace the janky old win32 with .NET managed APIs.

I just remember XAML/WPF/.NET being incredibly slow. And choosing a managed language for OS stuff seemed bad. I can't believe no one was doing a quick POC and saying: this is too slow.

You have to give credit to Apple platform team. They have some real visionaries there. They had the guts to ignore garbage collection even when it was taking over the entire software industry. I guess MS just needed a competitor for Java.

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

#58
post #5

The answer is: pick your poison. There is no best way. Microsoft would have you believe it is WinUI, but there is also WinForms, WPF, UDP, Xamarin Forms, .NET MAUI, Avalonia, Uno, and several other solutions. Even the landing page for WinUI starts off by comparing the differences between two versions of it. https://learn.microsoft.com/en-us/windows/apps/winui/

> Even the landing page for WinUI starts off by comparing the differences between two versions of it.

It feels like they are trying really hard not to annoy developers by telling them their stack is now legacy.

They should take all old technology and put it on an entirely different docs website.

> We've been there before, and intermediate layers between the platform and the developer ultimately produces sub-standard apps and hinders the progress of the platform. > >-- Steve Jobs - https://www.engadget.com/2010-04-10-steve-jobs-responds-to-c...

I've heard Steve say this a few times, and it always caused developer backlash. But having seen how things have played out, I think he was definitely right.

Honestly though, Windows should have just gone with HTML. The majority of HTML-based apps are nicer looking and feeling than Windows apps, and the perf is fine. I just don't know how they f'd up XAML/WPF so badly.

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

#59

What does Microsoft use? If Teams, Office, and VS Code are any indicators it is web-based technologies: https://techcommunity.microsoft.com/t5/microsoft-365-blog/4-... https://support.microsoft.com/en-us/office/office-is-now-mic...

Clicking on the second link and pressing back doesn't work until you click cookie accept :(

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

#60
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…

You've just very eloquently listed out the Windows UI framework dumpster fire.

I honestly don't think Microsoft has the balls or ability to set a singular way forward at this point. WPF/UML have both been pieces of hot garbage. So one more framework to rule them all probably isn't something they're looking to explore at this point.

What should probably happen is that they make an announcement similar to that which they dis with printer drivers. "Beyond 2027, it must all look like this. Here is 4 years lead time. Get on the train."

Post reply on HN