News for hackers. Stuff that matters.
Re:Your CPU may have slowed down on Wednesday by kortex on Tuesday June 22, 2021 @07:04AM (#27590166)
So what do we do about it? Even if Electron doesn't give feature parity across OSes, it still has some other huge wins. It allows you to use "webdev" talent to build guis, which are (I presume) easier to hire. They can use their favorite frameworks. It seems like SPA-esque-apps have some agility in development over other native approaches. It makes updates, CI/CD, and testing easier.

Even if not prioritizing cross-platform, Electron has some serious appeal.

What are my alternatives? Qt? Gtk? Native libraries?

Re:Your CPU may have slowed down on Wednesday by danmur on Tuesday June 22, 2021 @07:33AM (#27590374)
It's a shame that cross-platform GUI toolkits seem to have fallen out of favour somewhat (as in, native toolkits like Qt or GTK). I wish it were not so. I can see why the electron route is so tempting, I just really hate them as a user.

I wrote a bunch of GTK desktop apps with Python like 15 years ago and they were snappy and you'd never even know it was Python behind it, but I wouldn't do that now. Too hard to distribute, bindings a bit clunky, lots more cross-platform testing, it's hard to look at the relative levels of effort and not take the faster path.

Re:Your CPU may have slowed down on Wednesday by jschwartzi on Tuesday June 22, 2021 @10:14AM (#27591871)
A Qt install with all the bells and whistles is about 500 megabytes, so it’s very comparable in size to Electron. Qml is a lot easier to develop in than Node+browser though.
Re:Your CPU may have slowed down on Wednesday by thereddaikon on Tuesday June 22, 2021 @01:32PM (#27594563)
Size on disk isn't, or shouldn't be a problem today. In an ecosystem where there are games that take up over 100 gigabytes of storage, few apps should be large enough to make a user double take. CPU and Memory usage on the other hand can be serious concerns and one where Electron apps have a serious problem compared to traditional approaches.
Re:Your CPU may have slowed down on Wednesday by beowulfey on Tuesday June 22, 2021 @08:17AM (#27590703)
I’m not one with much experience, but I rewrote my Qt based code for a small python app into C++ and the results were amazingly better. I would bet GTK might be similar!
Re:Your CPU may have slowed down on Wednesday by api on Tuesday June 22, 2021 @09:26AM (#27591290)
Qt is pretty good, but honestly since React came out I can't code a GUI in any other way. Reactive is the way to do (application) GUIs, period, and anything else feels like clunky bug-prone spaghetti.

I put application in parentheses because other paradigms may make sense for high performance rendering pipes like games.

Honestly I don't think HTML5/CSS/JS is that bad as a pure presentation layer. It has warts as they all do, but it can be made to look decent and is fairly productive. The bloat is mostly the fault of Electron specifically. Tauri and Sciter are much leaner, in some cases leaner than Qt depending on the app.

Re:Your CPU may have slowed down on Wednesday by Wowfunhappy on Tuesday June 22, 2021 @07:13AM (#27590222)
> What are my alternatives? Qt? Gtk? Native libraries?

I don't know what the development side is like, but as a user I do find Qt apps to be fairly nice.

I also think Java (Swing) apps are basically fine. Java was "bloated" back in the day, but not relative to what else is in use today.

Re:Your CPU may have slowed down on Wednesday by kortex on Tuesday June 22, 2021 @07:19AM (#27590258)
Hm, Jvm also gives access to Kotlin and Scala, I'll definitely have to look into it.

Qt development can be excellent or nightmarish, sometimes both. I don't know enough to know why the disparity but I've been adjacent to teams that love qt and ones that loathe it. I'm guessing a big aspect is state management; qt predates the reactive revolution, and IIRC is prone (as is any gui) to callback hell.

Re:Your CPU may have slowed down on Wednesday by ensiferum on Tuesday June 22, 2021 @09:40AM (#27591470)
Overall Qt is quite nice and works portably across platforms. You're right about callback hell but there's a fox for it. Personally I prefer to create a bunch of overloaded utility functions for different widgets and data types and in each utility function i use QSignalBlocker to make sure I'm not accidentally invoking any callbacks. I condiser any "raw" Qt "setXYZ" call to be a bug.
Re:Your CPU may have slowed down on Wednesday by kortex on Wednesday June 23, 2021 @08:39AM (#27603778)
Huh, neat. What's a "fox" in this context? I tried searching "qt fox" and got some, ahem, less than salient results.
Re:Your CPU may have slowed down on Wednesday by krylon on Wednesday June 23, 2021 @10:03AM (#27604681)
Typo for "fix" would be my guess.
Re:Your CPU may have slowed down on Wednesday by danmur on Tuesday June 22, 2021 @07:34AM (#27590384)
Just as a fun test a while ago I made a small desktop app with scala and scalafx/javafx. It's not bad, gives you some of the nice things you get from js guis (reactive rather than loads of callbacks etc).
Re:Your CPU may have slowed down on Wednesday by the__alchemist on Tuesday June 22, 2021 @10:36AM (#27592188)
> What are my alternatives? Qt? Gtk? Native libraries?

Yes. You are not a Javascript Programmer, or a Frontend Programmer; Choose the right tool for each job.