Live data from Hacker News

Writing GUI apps for Windows is painful

tulach.cc

381–390 of 577 posts

Re: Writing GUI apps for Windows is painful

#381

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.

Do you need to ship it alongside or produce it on request or link to where they can fetch it? It's not like you need to ship source code alongside either for GPL binaries.

Re: Writing GUI apps for Windows is painful

#382
post #2

Writing GUI apps is painful period, and it’s become more so not less in the last two decades. Go back in an emulator some time and try Visual Studio or even old Borland from the 1990s. Point, click, add code, set style, and the result was not bad at all. The whole UI looked consistent too with uniform controls, shortcuts, etc. Today UI apps use 100X more memory, are slower, and are harder to use with little to show f…

Say what you will about VB6 but it was stupid simple to get GUI apps up and running.

It was stupid simple to get simple GUI apps up and running. More complicated apps were impossible. But, I think that's exactly what's missing in the Desktop GUI market right now. Webapps are incredibly easy to start apps with. You only need to know a few things and you can pick up the rest later as your app gets more complex. Modern desktop GUI systems are incredibly complicated, in comparison, just to open the window, let alone put text on the screen.

Re: Writing GUI apps for Windows is painful

#383

Earlier quoted context omitted.

If instead of insisting on custom UI styling the author just used the system UI, they could probably build a pretty straightforward Windows application. It’s the scourge of “brand identity” that has people thinking graphical applications are hard. Same on the Mac: If you want to build a Mac application, your best bet will be AppKit or SwiftUI and using system controls. And when the OS updates your application will ei…

This indeed. Custom UI widgets for Windows apps are really not necessary most of the time, and fitting in with the system theme is all you ought to aim for, most of the time. There are exceptions, for very rich dense UI, for UIs that need to be cross-platform, but if you're writing a Windows app, it should look and feel like a Windows app.

> There are exceptions, for very rich dense UI, for UIs that need to be cross-platform

That’s not exceptional at all. That’s completely normal requirements that are probably in the majority.

Does Microsoft themselves build their apps this way?

Re: Writing GUI apps for Windows is painful

#385

Earlier quoted context omitted.

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

Nuklear is sometimes used. Anyhow, I do know of some game engines created and used by a (very large) game studio that uses ImGUI. I won't say anything else though :)

> I do know of some game engines created and used by a (very large) game studio that uses ImGUI.

It often isn't a secret: https://github.com/ocornut/imgui/wiki/Software-using-dear-im...

Re: Writing GUI apps for Windows is painful

#386
post #372

Earlier quoted context omitted.

Thanks for the follow-up. These types of anec-data are the best part of HN. > It felt like magic when it worked, all those VStack HStack nestings I know the feeling from Qt. I think Gtk and many other GUI toolkits use the equivalent of VStack and HStack to make resizable GUIs. Some GUI toolkits try to avoid this problem by using a grid layout, but it is more rare. EDIT > made me seriously doubt whether I’d build a bi…

I don’t have much app experience, I’m mostly a back-end guy trying to build some prototypes and (hopefully) one product. I’m not in a position to give anyone advice, but I’d love to find SwiftUI but cross-platform and usable from anything other than XCode (well maybe not Ed…) and native GUI and a pony. For my product I need to support Mac, Windows and eventually iOS/iPadOS. For prototypes iOS is enough. I don’t mind…

If you really want native look and feel then really your only choice is to use the native toolkits.

I'm not convinced many users care that much about this though. They spend most of their day using apps that don't use native controls and I think they're all pretty used to it by now.

I prototyped a bunch of different desktop toolkits and I think that today Flutter is by far the most polished and mature. I've had overall a very positive experience using it for my music app:

https://plastaq.com/minimoon

The threat of Google canceling it is real though. I suppose if that happens I'll switch to Tauri or just give up on Windows and Android and do SwiftUI. My experiences with SwiftUI to this point have not been very positive though.

Kotlin Multiplatform might also be an option at some point but it doesn't seem that close today. Unfortunately it seems like none of the os vendors are making their desktop APIs a priority these days.

Re: Writing GUI apps for Windows is painful

#387
post #378

Earlier quoted context omitted.

I’ve had overall very positive experiences with Flutter. If I wasn’t concerned about Google’s long term commitment to it I’d use it for everything.

Did you do cross-platform and if so, did you use the same UI style for everything? Today I was making a list of reasons/excuses for using Material Design on Mac… which I guess would make some people mad, but it might work for an enterprise product.

Yes cross platform and the same style. I don't think this matters much to users today. They're used to it.

That said I did do a fair bit of my own theming. The Flutter Material widgets are actually pretty customizable and I'm not a big fan of vanilla Material.

https://plastaq.com/minimoon

Re: Writing GUI apps for Windows is painful

#388

Unfortunately, if you are insisting on a single exe file, then you have to be way more flexible on your requirements than the author is. There’s a reason that practically every Windows program has an installer. It’s stupid and a waste of time but also probably more of a waste of time to try to be the exception to this rule. Frankly I don’t see why C# targeting an old (3.5?) .NET framework version wouldn’t work for th…

I agree with the sentiment of your post. Real question: Is a single exe not possible when targeting .NET Framework 3.5? Or is the problem that the sum of their silly requirements makes it impossible?

It should be quite possible to target .NET 3.5 and hit all the other requirements, except native C++. They hinted at this and then started talking about C++/CLI. If there’s ever a tool of last resort, that is it.

Re: Writing GUI apps for Windows is painful

#389

Earlier quoted context omitted.

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

This is true. There is a reason why Scaleform made its way to become a popular gaming UI framework even though many of its weakness. The most important focus in game UI framework should be on tools and pipelines for artists/designers and this is usually not up to engineering decisions. I won't say that using ImGUI for game is impossible, but there might be lots of tooling works ahead for production game development.

Re: Writing GUI apps for Windows is painful

#390

"Writing GUI apps for Windows is painful" Until you discover Delphi/Lazarus.

Some day I wish for someone to rebuild Lazarus with go and yaegi.

Then I would never use anything else ever again.

Lazarus' UI component library is beyond amazing, and growing up with it as a teenager made me realize how bad everything else is in comparison.

Post reply on HN