Hacker News new | ask | show | jobs
by ryandrake 1740 days ago
Did you consider Qt or some other cross-platform native option? There was just recently a HN article [1] on the topic of cross-platform development and UX, with a few alternatives proposed. I think some teams just reach for the Electron tool by default now, instead of weighing each alternative and then choosing it with eyes open. Maybe your team did examine the pros and cons, but it seems the overall software industry is headed toward a simplistic "Cross Platform Client equals Electron" which is disappointing.

1: https://news.ycombinator.com/item?id=28390732

5 comments

It reads as though there's some confusion between "simplistic" with "simple". Electron is the simple answer, and "simplistic" is frequently used to try to shit on that. (Its implementation is complex. So is Qt's. But nobody cares about that for either, because it's done.) Qt's definition of "cross-platform" is functionally limited to "Windows, Mac, and Linux" unless you want to do way more work for a way worse result. That's not simple at all.

Qt runs in a web browser via WebAssembly but building an application that way--I mean, if you want that to work, good luck, but it's a presumptuous ask to make of a developer. If you want to have a client somebody can log into via Chrome or Firefox? Hi, now we have two codebases that aren't sharing logic.

Qt also doesn't work well on iOS or Android. Attempts have been made. They're not viable without significant work that "Qt is cross platform" elides, and you're probably forking your entire codebase for what you can actually salvage. And when you've built a Qt application, there's a whole lot less that's reasonably sharable when you eject out of it on those platforms (because you will), as opposed to the large amounts you can effectively share between React and React Native (see also the web-hosted option above).

Personally, managing a QT application across multiple OSes is itself harder as I’ve spent a lot of time doing platform-specific UI work (eg. fonts on macOS and DPI scaling problems on Windows) compared to Electron. The only similarity was in doing platform-specific tooling for deployments/code signing which is par for the course.
Electron leverages web-style development, which Qt (or GTK or FLTK, or JUCE, or wxwidgets, or libui ... etc) does not manage to do in any real sense.

If your dev team thinks in web-like terms, Electron is a more comfortable place to be. Better? I'd agree with you that it's probably not.

"Better? I'd agree with you that it's probably not. "

Not really disagreeing, but "Better" is just constrained by the real ressources at hand. You have a team, specialised in making plattform independent QT apps? Sure, that is what you do. But chances are you don't, so you just target the web as web devs are plenty around.

"Academic" metrics of what is theoretically more preferable as a plattform and should be considered "better" are usually not very helpful to actually build things.

There's a bit of a chicken-and-egg thing going on here, though. As a close-by comment noted, there are signs of a convergence of thinking towards "cross-platform means Electron", when this is not actually the case (or is not required to be the case).

To the extent that this is true, it acts as disincentive for people wanting to pursue non-web-dev pathways in their careers, which then further limits the availability of such developers, which then further "confirms" the "cross platform is Electron" idea.

Developing with Qt is (I am told [0]) not much harder than typical web equivalents, but it is different. The result is generally more performant, both in terms of UI and also data handling/computation.

[0] I personally work with GTK, not Qt; Qt goes much further with hand-holding developer helpers than GTK does.

I suspect "everything is a web app now" has become a really big consideration. JavaScript has essentially succeeded in doing what Java tried to do two decades ago: be the One Language for both client and server. So if you're building a server-client application like a Discord competitor, it sounds like just an awesome idea to be able to use JavaScript to build your server back end and your web app and your various desktop client apps.
FWIW, as a mostly backend/native developer, I know that I've spent way too much time looking for a widget set that works well enough for my needs. These days, if I need a front-end, I'll be targeting the web or Electron.

So, +1 to the developers of Revolt.