Remix.run Logo
pdimitar 7 months ago

Wish I could but many people gave up and started using Electron due to employability. And we're stuck with crappy laggy UIs. I remember the MirandaIM multi-messenger from 20+ years ago very fondly... 50MB RAM usage and I was signed to 4 services, on a computer that my smartphone today can emulate 16 of, simultaneously, and it was still running faster than you can blink. Ehhhh, good times.

Electron/JS is a herd just running in one direction, personified.

The fact that something is popular does not imply quality, not at all. Most of the time it implies that everybody settled on it and does not want to hear otherwise for various reasons (in this case: money, as employers are never going to give you the requisite time to build stuff with Qt or others).

foldr 7 months ago | parent [-]

It could be that Qt would work better and no-one is using it for the sorts of reasons that you mention. But I think the more plausible explanation is that no UI library can compete with what the browser offers anymore. This would hardly be surprising. The person hours invested in HTML+CSS rendering vastly exceed those invested in Qt or any other UI lib.

The kind of argument you're making would be much more convincing if there were relevant examples of Qt-based apps that provided a superior user experience to the Electron apps you're criticising.

I don't personally find Electron apps laggy in general. VSCode is very responsive, for example.

rubymamis 7 months ago | parent | next [-]

Probably because you're using a very performant machine (M1-M4 are extremely capable), but other than responsiveness (which even on an M1 isn't perfect), you got 3 more issues with Electron apps:

1. High RAM usage.

2. The bloat will accelerate as more abstractions are added to web frameworks.

3. Battery usage - the most noticeable issue for me. I've yet to empirically test this, but my guess would be that Electron apps use substantially more power than native apps. I will test this theory eventually.

pdimitar 7 months ago | parent | prev [-]

Yeah VSCode is fine, I agree. But as mentioned above, if one can screw up their Electron app to be as laggy as Slack then the tech is not good. I stand by that statement.

> The kind of argument you're making would be much more convincing if there were relevant examples of Qt-based apps that provided a superior user experience to the Electron apps you're criticising.

That's arguing in circles and it's the chicken-and-egg problem. Toolkits like Qt get less and less mindshare because Electron is desired and is encouraged by employers. I can't speak for Qt in particular btw, just using it as an example here, but my point is that it could be the best UI toolkit ever but since it takes a little more time to spin up an app with it then the business will want you to not use it.

Hence, I can't show you those Qt apps.

I feel that in these discussions people just blindly trust popularity to be an indicator of quality. I have a huge problem with that mindset and my career has seen the exact opposite, many times. Hence my comments. And if you want to take away just one thing from our discussion, it's this: please don't mistake Electron's popularity with the idea that Electron is the best UI toolkit.

foldr 7 months ago | parent | next [-]

It's not arguing in circles. It's just asking you for evidence that an app like Slack would be better if it were implemented in Qt or a similar library. If there is literally no example of this having been done successfully, how can you be so confident that it would work great?

>Toolkits like Qt get less and less mindshare because Electron is desired and is encouraged by employers.

But why is it desired? I've used Qt before (a long time ago) and know enough C++ to be dangerous. I'd still avoid using Qt simply because I already know how to make UI's in HTML+CSS. I can't say that replacing those tools with a manually-constructed C++ object graph – or with an unfamiliar markup language (QML) – strikes me as an appealing option. Most of the people carping about Electron apps on HN don't want to make a UI in Qt either! It is becoming one of these legendary magical technologies (like Lisp) that is much praised and yet too little used for its flaws to be common knowledge.

pdimitar 7 months ago | parent [-]

> If there is literally no example of this having been done successfully, how can you be so confident that it would work great?

Past experiences. I've seen much smoother and faster apps more than 20 years ago. Surely they weren't using black magic.

> But why is it desired?

Because it is slightly quicker to start an app with it and because people want to have a web variant of it (runnable in the browser) if/when necessary. Those are actual selling points and I agree with them wholeheartedly -- I object to Electron's lagginess however. They can and they should do better.

> I'd still avoid using Qt simply because I already know how to make UI's in HTML+CSS.

Well yes, that's one of the factors -- people default to what they already know. But zero mention is given to the numerous problems with the DOM model of making UIs as well... a topic way too big for me to have any desire to delve in, again.

Inertia. A bad thing starts being used widely because of 2-3 desirable traits, and when it gains enough critical mass nobody wants to criticize it.

Well, I do.

foldr 7 months ago | parent [-]

>I've seen much smoother and faster apps more than 20 years ago

Me too, but they didn't have all the whizzbang UI features that you get for free from a web stack. I could live without most of those, but users do expect all that stuff to work these days.

pdimitar 7 months ago | parent | next [-]

I am one of those users. I do my job as a programmer to the best of my ability and I am not allowing lags for as much as humanly possible (sometimes you can't do anything about a slow 3rd party API though). They should do the same. I have no sympathy for sloppy work, and Slack and Teams are in the top two spots there.

foldr 7 months ago | parent [-]

Sloppy work and bad code are orthogonal issues to choice of technology. There are some sloppily written Qt apps out there too.

If the Slack devs are as sloppy as you say, then we ought to be thankful that they’re writing JS and not C++!

Lag is something that some people care about a lot. I actually think that most users don’t notice it or care very much, up to a certain point.

pdimitar 7 months ago | parent [-]

> There are some sloppily written Qt apps out there too.

I specifically asked not to focus on examples but OK, I guess you really had to get it off your chest. ¯\_(ツ)_/¯

The topic was not "Electron vs. Qt" at all.

> I actually think that most users don’t notice it or care very much, up to a certain point.

Good for them, to me it's a mood and productivity killer. And no I'll not change my mind on this, ever.

Broader point is: the people who worked on Electron, Slack etc. should have really done better. But I have witnessed how job security almost always leads to sloppy work.

rubymamis 7 months ago | parent [-]

Actually, the people who created Electron (and the code editor Atom), themselves abandoned it to create a performant code editor called Zed - with its own GUI toolkit based on Rust.

pdimitar 7 months ago | parent [-]

Case in point / point proven then. :D

I didn't know they were the same. Fascinating actually, thanks for making me aware of it!

rubymamis 7 months ago | parent | prev [-]

What kind of UI feature are you speaking of? I would love to see how easy it'd be to do in QML.

rubymamis 7 months ago | parent | prev [-]

One obvious reason why Qt is less popular is the ability for companies to deploy web apps (non Electron, but in the browser). Many end users expect a desktop/mobile app to also be accessible using the browser.

I'd argue that QML is an order of magnitude easier to develop than any other web frameworks (yes, you do have to get familiar with it, and if you made some apps before you could re-use some essential, battle-tested components). I hope to maybe share/sell some of mine some day.

I'm not sure what to answer regarding the browser experience. WASM isn't really there, isn't it? I haven't had a chance to test it on my own apps yet tho. I recently had a thought that maybe that Qt Company should also target HTML/CSS/JS generation of a QML file. Another, more interesting thought would be for browsers to be able to process and render QML files natively (but that won't happen without substential market share).

pdimitar 7 months ago | parent [-]

> but that won't happen without substential market share

So again: the chicken-and-egg problem.

Basically, nothing is going to improve until somebody rolls up their sleeves and does all the hard work for free and do better than Electron -- or a corporation will push for it, it's always one of both. Then everybody else will flock to them.

That's what I observed several times during my life and career.

rubymamis 7 months ago | parent [-]

Completely agree. I'll try my best (: