Live data from Hacker News

Build desktop applications using Go and Web Technologies

github.com

71–80 of 82 posts

Re: Build desktop applications using Go and Web Technologies

#71

The lengths we will go to avoid writing a proper desktop application.

But I already know how to write a web app, I don’t know how to write a desktop app. It’s faster to just write and wrap a web app, and as far as most people can tell, it works just fine. Ya gotta be practical.

I have been programming since 1986, have enough knowledge across several platforms, even though in 2025 distributed systems + Web UI pays the bills, I can still easily code native in a couple of UI frameworks.

Doing native UIs is only a matter of actually wanting to learn how to do it.

Re: Build desktop applications using Go and Web Technologies

#72
post #29

Earlier quoted context omitted.

Those are not native (on desktop) in any sense of the word. They don't use native controls. For that, you want WX or SWT, but those come with their own sets of problems. On Windows, it's not even obvious what native is any more, even Microsoft just uses Web views. Mac is a bit better, but there are still 4 UI libraries to choose from (AppKit, UIKit through Catalyst, native SwiftUI and Catalyst SwiftUI). I'm personall…

QT will mimick Win32 and Cocoa just fine.

Assuming you use Qt Widgets.

As far as I can tell, Qt Quick doesn't have anything like the same set of polished widgets that integrate nicely into the target platform. It's been this way for years, they just don't seem interested in implementing them.

https://doc.qt.io/qt-6/qtquickcontrols-examples.html

Re: Build desktop applications using Go and Web Technologies

#74

The lengths we will go to avoid writing a proper desktop application.

But I already know how to write a web app, I don’t know how to write a desktop app. It’s faster to just write and wrap a web app, and as far as most people can tell, it works just fine. Ya gotta be practical.

Why can't there be web developers and desktop developers?

Re: Build desktop applications using Go and Web Technologies

#75

The lengths we will go to avoid writing a proper desktop application.

because there is no proper UI library that does cross platform as well as the web

What's the reason not to write desktop apps in Flutter in 2025?

Re: Build desktop applications using Go and Web Technologies

#77
post #25

The lengths we will go to avoid writing a proper desktop application.

Making good GUI software requires a lot of iteration and trial and error before you're satisfied with the UI and UX. With a web-based tech, you make a change, auto reload triggers, you see the change almost instantly, making tweaking very easy. If you're working with a large Qt codebase, every little change to a header file requires a long ass compile times. It's really frustrating when you spend an hour just tweakin…

On the other hand, the developer convenience offered by Electron et al. comes by sacrificing runtime efficiency. It's astonishingly wasteful of resources, and that waste gets multiplied by every computer that runs the program, and every time it is run. The long-term costs saved by the developer are thereby amplified and pushed onto the users, in the form of shorter hardware upgrade cycles (and potentially increased electricity usage).

Just as a book will be read many more times than it is written, the burdens associated with a program's architecture will be borne many more times (collectively) by its users than by its developer. This is why I avoid web-based tech when building applications.

Relatedly, I'm glad to see that sustainable computing has begun showing up in global discourse.

Re: Build desktop applications using Go and Web Technologies

#78
post #24

Earlier quoted context omitted.

Qt Quick Controls, React Native, and Xamarin.Forms all generate honest-to-god native controls. E.g. Cocoa, Win32 or Windows Presentation Forms, etc.

gp was using a more restrictive definition of "native controls". I.e. "o/s builtin UI controls" vs "framework canvas painted elements". For Windows, "native" would be the classic Win32 UI "common control" elements from "Comctl32.dll"[0] that is directly used by older GUI frameworks such as Windows Forms. Those map to classic Win32 API CreateWindow(L"BUTTON", ...) . In contrast, the newer frameworks of WPF and Xamarin…

It's worth noting that some cross-platform toolkits are non-native in the strict sense, but mimic each platform's native controls.

This is harder to get right than one might think; small differences in text rendering look very much alien to me, and user input handling that isn't exactly the same as the platform's native conventions will make me stumble every time I perform common operations.

In my experience, Qt does an excellent job with this. It's not technically native (except on KDE and other Qt-based desktops), but it looks and feels right, or so close that I find it comfortable and well integrated with the rest of each platform I've tried. I haven't found any other cross-platform toolkit to match Qt in this area, so that's what I use for now.

Some day, I hope we'll see an alternative that accomplishes this at least as well as Qt, while being more flexible to license, easier to bind to other languages, and better at memory safety. (It's written in C++.) There seems to be renewed interest in GUI toolkit development lately, perhaps fueled by the excitement for newer languages like Zig and Rust, so perhaps I'll get my wish.

Re: Build desktop applications using Go and Web Technologies

#80
post #58

Earlier quoted context omitted.

Sure, but GTK and KDE aren't also cross-platform native.

Why should they be?

Of course, there's no need for them to be. But this conversation started out with "why do people use web based UI solutions?" and "because there is no proper UI library that does cross platform as well as the web".
Post reply on HN