Hacker News new | ask | show | jobs
by rumanator 2247 days ago
I don't understand how this sort of question gets pummeled with downvotes. Having developed Qt and XAML applications, I have to say that the DOM approach makes a lot more sense than wrestling loosely bundles of widgets. In the end Qt apps end up with a widget tree, but the path that they take to get there is convoluted and packed with unnecessary fusion of UI responsibilities and data and even business logic.
2 comments

I don't think end users decide which GUIs they like based on their "DOM approach" any more than they decide what milk they like based on the milking approach.
I'm pretty sure that users like good software with pretty GUIs that are easy to use and navigate around and extend.

DOM-based frameworks make this sort of stuff trivially to implement, and some of them evem come with gesture and animation support out-of-the-box. Meanwhile, feel free to take a look at Guitar's source tree to figure out if that is trivial to work with, and at best it looks like an app from 1998.

https://github.com/soramimi/Guitar/blob/master/src/AboutDial...

Looks pretty much the same as stitching DOM elements to me, and various runtime modifications in HTML-based frameworks remind me of the "put widget into container" code style of Tk. There's even a CSS-based styling support for Qt.

The main difference is that there is easy way to make a visual designer for the QT .ui files, so it's actually even easier to write GUI apps there.

And DOM based frameworks do nothing to ease of use, ease of navigation, or pretty much anything done by end user*. They make it easier on making portable GUI, yes, but that's on developer side, and with significant costs associated to everything, including reputation of the application and developer.

Qt and widget based programs are absolutely not difficult to make. I don't know where this comes from. They are fast and responsive by default instead of laggy and sluggish on a many core xeon loaded with ram. Even using PyQt and embedding python is like a feather compared to electron and that approach is extra easy.
But that's not really the point. How easy is it to make great UIs with them?

How easily can you make a staggered fade and slide in animation? Responsively change layout? Apply complex styles?

That's a good question but what's the point of all this if no one can use the app if they don't have a minimum of 8gb ram? My wife couldn't run Spotify, slack at the same time cause her machine started swapping.

The developer experience is vastly superior in electron and it's reach is massive. There's no denying. But the underlying problems are pretty serious and the people who complain are not just hating for random reasons.

I hope you get how insane it is when your cpu fan starts spinning because of an app that plays music in the background!

So far the pro electron arguments are concerned only about developer experience who generally have beefier specs in their machines.

The lowest common denominator in end user machines are very different and I request you please keep that in mind!

P.S: I'm a web developer and I fully understand how much valuable electron is for me.

> That's a good question but what's the point of all this if no one can use the app if they don't have a minimum of 8gb ram?

Even vscode, which has a gigantic memory footprint due to its plugin system, requires 1GB to run comfortably.

Nowadays you get computers with 4GB of RAM for 60€.

Let's not bother ourselves with irrelevant details.

I hope this is genius level trolling.

In case it's not: great UI != any of those

This:

> great UIs with them?

is completely opposite to these:

> staggered fade and slide in animation?

> Responsively change layout?

> Apply complex styles?

A UI that can change layout to accommodate your window size and in which UI elements don't confusingly jump around when you click something but transition is bad? I'd like to read about your idea of a good UI.
You can't! You can really only make QT apps with them. I think it's funny that people see the lack of features and visual distinction as an advantage.
Qt apps can have lots of features.. Did you never use KDE3?
> I'm pretty sure that users like good software with pretty GUIs that are easy to use and navigate around and extend.

I don't know about other users, but I like good software with functional UIs that are easy to automate and extend. In my experience, that's definitely _not_ Electron-based UIs. It's also not most GUIs either for that matter.

I absolutely do _not_ want "gesture" and "animation" support. Gestures are a hack for a shitty touch-screen input with zero tactile feedback. Animation is just a power hog for, like you said, a pretty interface. I don't want a pretty interface if it costs performance, costs battery, costs usability.

Plenty of people seem to not use Electron apps despite their sometimes superior UX, because the inherent problems with it are so off putting that the improved functionality doesn’t make up for them.

That said, if superfluous animations are a big part of the benefit, you can count me out in any case.

Qt has widgets. DOM approach doesn't have widgets but <div> elements stitched together to pretend to be something else than boxes of text.
> <div> elements stitched together to pretend to be something else than boxes of text.

As a Norwegian <div> makes perfect sense, as "div" is a common shorthand for "diverse" meaning "various" or "miscellaneous". At least that's what I always think of when writing <div>.

It's short for a "content division" being a generic reflowing container.