Live data from Hacker News

Ask HN: How to make a native GUI with a modern language?

news.ycombinator.com

71–80 of 145 posts

Re: Ask HN: How to make a native GUI with a modern language?

#73

> HN has strong opinions against Electron Beware the bias of the loud minority. For every 1 noisy user, there may be 50 quiet users who are fine with the decision to use Electron. Shipping beats not shipping every time, and if Electron is what you need, then do it. I say this as someone who does not like Electron, but also as someone who knows that writing comments on HN is 100x easier than actually shipping producti…

Part of me wonders why someone hasn't tackled creating an Electron runtime service, so that each installed app doesn't load what could be a shared library into memory. There's a host of complicated problems there, but if the major issue is fat runtimes it can be pared down like Chrome workers.

Re: Ask HN: How to make a native GUI with a modern language?

#74
post #57

Earlier quoted context omitted.

I usually agree with this sentiment of shipping vs not shipping. But Electron is just really bloated. You cannot install 10 apps and regularly use it. Most systems will just hang or crawl. Systems with 8GB should not be hanging because you are using 10 apps. I have 16GB RAM and even then I feel the hog with Discord, Slack, VS Code, A note app taking up too much memory. Then there is unnecessary security risk of bring…

It is sad. But I'd rather people ship something and refine the Electron version than never ship anything at all. Mostly because I believe more in indie devs than I do in the purity of software.

As an indie dev who has been working on an Electron application, thanks. Reading comments on message boards like this one, it's easy to pick up the attitude that it would be better to have less software than more crap. And I think that internalizing that attitude hurt my productivity on this current Electron-based project. But once I was able to push through that and get the app out to actual users, I see growing enthusiasm among the target user base, and as far as I know, zero complaints from actual or even potential users about the fact that the app uses Electron. Sure, maybe those complaints will come once the product gets past the early adopter phase, but the reception so far has been encouraging.

Re: Ask HN: How to make a native GUI with a modern language?

#75

Are C# WinForms or VB.NET not the right answers here for some reason?

WinForms will only look native on Windows. On cross-platform it generally looks like a mess. Also, even on Windows it may look native but it also looks "dated" generally.

Re: Ask HN: How to make a native GUI with a modern language?

#76

Personally I like JavaFX. I made something pretty complicated with tkinter and Python. It's not that hard to do but the result looks awful, it doesn't support many features people expect in 2022, and the documentation for using tk in Python is poor. You probably need to refer to the tcl/tk documentation and translate it in your head to apply to Python. As much as people hate Electron, the rendering engine in a web br…

JavaFX is terrible and I'm a Java fanboy. It isn't native looking so it doesn't satisfy the requirements outlined above. You can get a facsimile of "native" but at a lot of effort and for specific cases. But the problem is the deployment story. It requires native libraries so you need to package it somehow. Ideally, one day GraalVM will support JavaFX. That day isn't here. So you need JavaPackager which is one of the…

There is no such thing as native, windows doesn’t even have a singular native look.

And as far as I know jpackage and the like should be able to package a javafx program just fine.

Re: Ask HN: How to make a native GUI with a modern language?

#77
post #14

Personally I like JavaFX. I made something pretty complicated with tkinter and Python. It's not that hard to do but the result looks awful, it doesn't support many features people expect in 2022, and the documentation for using tk in Python is poor. You probably need to refer to the tcl/tk documentation and translate it in your head to apply to Python. As much as people hate Electron, the rendering engine in a web br…

> trouble w/ Electron is that you have 30MB of runtime for any application JavaFX has the same problem? Or you rely on user's JREs already installed? I'd think 30MB really isn't much any more.

A browser is much bigger than a runtime with a few packages though.

Re: Ask HN: How to make a native GUI with a modern language?

#78

Personally I like JavaFX. I made something pretty complicated with tkinter and Python. It's not that hard to do but the result looks awful, it doesn't support many features people expect in 2022, and the documentation for using tk in Python is poor. You probably need to refer to the tcl/tk documentation and translate it in your head to apply to Python. As much as people hate Electron, the rendering engine in a web br…

JavaFX is not native, nor can it be made to look native like Swing can be made.

Why couldn’t it be native (whatever that even means)? At the end of the day, it does have a canvas you are free to draw anything on, so there is nothing you can’t imitate.

Re: Ask HN: How to make a native GUI with a modern language?

#79
MAUI in .NET 7 checks many of the boxes you have here:

- Native looking: MAUI supports native controls as much as possible

- Cross platform: Nearly everything but Linux today (and there are forks out there trying to bridge that gap); macOS (Catalyst), Windows, iOS, and Android

- C# as the default .NET option is a very sane language. Other options may be possible with more effort. (Some people are still working on that.)

- MAUI's focus is still on declarative XAML UI with databinding (MVVM), but there's a growing community for MVU (vaguely Elm-like) architecture including some official out-of-the-box support now.

Re: Ask HN: How to make a native GUI with a modern language?

#80

If you don't think C or C++ are sane languages you are never going to write any thing sane for Von Neumann computers imo. Much less something cross platform.

in practice C/C++ have little in common with how modern hardware actually works https://queue.acm.org/detail.cfm?id=3212479
Post reply on HN