Live data from Hacker News

Writing GUI apps for Windows is painful

tulach.cc

311–320 of 577 posts

Re: Writing GUI apps for Windows is painful

#311

While it’s a bit cumbersome, he doesn’t really point out any major flaw with the WinForms/WPF ideas, other than of course requiring two stacks. He says he wants native code and wouldn’t want any C# visible but doesn’t explain why. Fear of reverse engineering? UI code rarely contains anything secret. Also the single exe deployment, while convenient at times, is perhaps not worth the hassle in this scenario. Using a pa…

Agreed. I had the exact same question. From the article: "The issue is that with bundling the .dll, it would still mean it being extracted somewhere and writing additional code for the P/Invoke to work, and C++/CLI gets compiled to .NET IL code, in other words, you can open the resulting app in dnSpy and see the C++ code translated to C# equivalent (which is not what I want, I want native code)." I don't understand w…

Same here. People are confused because the author gave two options:

  1. Bundle the .dll as a resource into the app and make it extract it to some temporary folder, then use P/Invoke and call the compiled .dll from within the C#/.NET app.
  2. Use C++/CLI.
And then a single "problem" paragraph that didn't make it clear which problems go with which approach.

Re: Writing GUI apps for Windows is painful

#313

Earlier quoted context omitted.

No need for an installer when it's just one file you can run anywhere. And folders/zips are way too hard for the average user. Ask me how I know. My partner gave up an entire game platform because it was delivered as a .7z file they could not figure out.

But a .7z requires a custom expander, .zip is natively supported by windows, isn't it?

.7z recently got native support.

Re: Writing GUI apps for Windows is painful

#314

Writing GUI apps for Windows in C++ is painful There, fixed it for ya. There are solutions if you're not hell-bent on using C++, be it .Net, Lazarus (FreePascal) or Delphi. We're using Delphi at work and for the most part it's super simple and easy.

> Writing GUI apps for Windows in C++ is painful I don't think so. Qt makes this a trivial problem, and WinUI3 supports C++ as a first class citizen. I'd argue that desktop development for Windows was never as good as it is right now.

Indeed, QML and C++ together are the best mix out there for GUI development. I've written my block editor completely using Qt C++ & QML: https://www.get-plume.com/ and it was a breeze.

Re: Writing GUI apps for Windows is painful

#315
post #292

This is a good overview of some of the options, but the author’s specific requirements push it in a specific direction that eliminates a lot of options. Specifically, the requirement for completely custom GUI styling without writing his own render functions means it’s really a task of selecting easy, customizable GUI libraries rather than generic GUI work. The requirements to be self-contained executables and under a…

Title is "Writing GUI apps for windows is painful", and then the author slaps on a bunch of bullshit constraints but pretends to be covering the general case. Sorry dude, if you want to do that then change the title to something appropriate like "Writing small, custom styled GUI apps for windows is painful". Otherwise this is bait and switch. Implicit (for me anyway) in the title is that you are talking about vanilla…

"Writing small, custom styled GUI apps for windows is painful"

I'd add "for free because I'm too cheap to buy a license for a toolkit that does what I want".

Re: Writing GUI apps for Windows is painful

#316
post #214

Earlier quoted context omitted.

Nope, the GUI story is so bad, that at BUILD 2024, WPF was made again an official Windows GUI framework for .NET devs, see BUILD 2024 sessions regarding Windows programming.

Haha.. That is too funny - I haven't been following this closely anymore. It's honestly wild. Does WPF still do data binding by reflection? I can usually "feel" a WPF app if I'm doing a lot of data work. I remember when WinForms (which I thought was fine!) was killed. Why they just didn't continue to build on that I don't know (yes, I've heard the explanations, the importance of things like having XML (barf) in the f…

WinForms is still actively developed (although it wasn't always).

I prefer XML to manually placing controls in a window and clicking around a designer GUI at all times. XML is trivially editable by hand, WinForms auto-generated C# isn't.

Re: Writing GUI apps for Windows is painful

#317
I would like to show my appreciation to the author of this blog, although a lot of comments here show otherwise, as the restrictions the author has involved here are considered as "unrealistic" or "unreasonable".

Whenever an article is trying to compare several options, it is very important to know beforehand what the author is trying to achieve, and what the restrictions are. And in this blog, the author has clearly stated that the restrictions are to develop a GUI within 40MB and should be easy styling. No one should judge the author for the restrictions, as it may be from the author's specific needs, or directly come from the client's requirements. The clear restrictions are also very helpful for readers like me to understand the trade-offs the author has made, which is not something that I have to do myself, but I can definitely learn from the author's experience. If I am in a similar situation, or even with different restrictions and need to make a different trade-off, the author's experience can still be very helpful for me.

Just want to call out that it is not a fair ask for a blog post to exhaustively compare all the options, as it is very time-consuming for even a paying job. We learnt the specific restrictions that the author is facing to, and we learnt the author's experience with the options that the author has tried. That is already a lot of value that the author has provided to us, and I would like to thank the author for that.

Post reply on HN