Live data from Hacker News

Writing GUI apps for Windows is painful

tulach.cc

281–290 of 577 posts

Re: Writing GUI apps for Windows is painful

#281

I'm working on a GUI toolkit that should match the requirements: Slint - https://slint.dev Can be compiled statically in a single .exe that is smaller than 40M. Has a license that allow proprietary on desktop for free. Has dark/light styles. Even comes with a (work in progress) drag and drop WYSISYG editor.

Wasn't it mentioned in an HN post or comment somewhat recently (like a few weeks ago)? I think I saw it then, and checked out the site and a few demos at the time.

Re: Writing GUI apps for Windows is painful

#282

Earlier quoted context omitted.

LGPL. Which eliminates his requirement for a single executable. With LGPL you are only allowed to link dynamically.

Not true at all. The LGPL does not specify anything about mode of linking or anything like that. What the LGPL requires is that the end user be able to take the source code for the LGPL part, modify it, recompile it, and then replace the functionality in your binary provided by that part with their new part. Obviously with dynamic linking this is almist trivial, the end user replaces the so or DLL and done. With norm…

> If you ship alongside your binary a bundle of eg .o files and a script that links them together with a .a for the LGPL part for example, this is also compliant without revealing the source code to your non-lgpl part.

This is super clever, I love it! Does any software actually do this?

Re: Writing GUI apps for Windows is painful

#284
post #214

Earlier quoted context omitted.

WPF has been superseded (supposedly) by UWP / WinGUI / MAUI / Blazor?

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 framework).

How can you not be absolutely kicking butt on your own platform with a great story especially because they absolutely HAD a great story both at entry level LOB and advanced LOB.

Re: Writing GUI apps for Windows is painful

#285

Earlier quoted context omitted.

If you’re on windows and want a “standard” guy, either use the .net GUI or Qt , if you want completely custom and willing to do the work use QML or ImGui (or variant like eGUI)

Which particular .NET Gui? There is a collection of them: MAUI, WPF, Blazor Hybrid, WinUI. Microsoft have utterly screwed the pooch on getting their .NET GUI story straight.

In my opinion, WPF is the logical choice. Still.

Re: Writing GUI apps for Windows is painful

#286
post #55

Earlier quoted context omitted.

Dear ImGui is for development/debug tools, not an UI for the end-user. It's great for small projects as long as you don't care about accessibility, or proper keyboard support, or adherence to standard UI conventions, or support for devices without GPUs, proper font rendering, etc. ...

It's also suited to games, where "non standard" UI is expected and part of the experience.

Most games don't use ImGUI, though. Like the parent commenter said, it's useful for debugging, but the actual in-game UI—HUD, inventory, map, etc—is usually rendered by yet another middleware framework like Scaleform, or something that the engine provides (Unreal or Unity).

Re: Writing GUI apps for Windows is painful

#287
> The result should be a single .exe file with no or minimal dependencies and a size of less than 40MB

Computers come with a modern browser now. Instead of a .exe file, could it be, let's say, a single .html file with inlined image/css/javascript?

Re: Writing GUI apps for Windows is painful

#289

> Writing the GUI part of the program should not take more time than the actual functionality I don't understand why this is a rule. I mean, I don't know what the author is trying to build, but in general the GUI is the part that the users spends all of their time interacting with. I don't see why it would be a problem if a little more time was spent there.

I agree.

Also, in my experience, writing UI code is usually more(!) work than writing the functionality underneath, because

a) styling / layouting has to be learnt from scratch (e.g. because of a proprietary language, e.g. QML or QWidgets for Qt)

b) you have to take care of every frikkin' single user interaction (which becomes worse the more dynamic and custom your UI is), and building proper accessibility is also no walk in the park

Re: Writing GUI apps for Windows is painful

#290

A. If a gun were placed to your head and you had to write a native Windows app, what stack would you use? B. And, if you had to write a cross platform app, which framework would you use?

A. imgui and SDL2 B. imgui and SDL2

That's not what I asked...
Post reply on HN