Hacker News new | ask | show | jobs
by trinix912 1405 days ago
Electron is not a good option either. It defeats the entire point of making a desktop app in first place. It's slow, wasteful, abstracts too much of the filesystem away for a desktop app, doesn't integrate into the OS, doesn't use the OS-provided UI widgets, etc. etc.

It also depends on what you mean by "non-trivial". For me, something like Final Cut Pro is non-trivial. I'm yet to see that kind of thing (one that's actually used, not just a PoC) done in either Electron or Apple's Swift framework-of-the-year.

2 comments

I hear you on the downsides of Electron. The upsides are that there is a plethora of ready-made UI and backend integration solutions to choose from and an abundant pool of candidates to hire from, for a reasonable wage.

I don't think there are more than 1000 people worldwide who have shipped a moderately complex mac-native app within the past decade.

Apple doesn't seem to think it a problem - they're well on their way to becoming a company people despise but continue using, like Microsoft, Google and the rest of em.

> I don't think there are more than 1000 people worldwide who have shipped a moderately complex mac-native app within the past decade.

This is grossly mistaken.

The Mac App Store, which is only 11 years old, is by itself empirical refutation of this claim.

Also, I believe your claim is also mistaken that "Apple itself uses webviews for complex UI in their desktop Music app." Where do you get that from? I don't mean to be rude, but your other comment "I've mistakenly conflated Electron with webview use" strongly suggests that you're not technically sophisticated when it comes to analyzing Mac app binaries. No Mac developer would ever make that mistake. (I think we can safely assume that you're not one, considering that you think there are only 1000 worldwide.)

> Electron is not a good option either.

Nobody is saying that. It's a good stop gap for building cross platform apps that don't need to be rewritten every 2 years, when MS and Apple design PMs launch a new fad framework. (Friendship ended with rounded flat buttons, new best friend is glassomorphism)

What people want is primarily a good rendering target, and for that you just need a webview. You can port many electron apps to Tauri today and reduce footprint to native levels. OS vendors have slowly and reluctantly come around to provide webviews.

> It defeats the entire point of making a desktop app in first place.

Absolutely false. Sure, there are a few apps that could have been web only, but have you seen Electron's API surface? It provides a ton of useful features for apps that can't be achieved through the web, such as.. Opening a file by path.

> It's slow, wasteful[...]

Electron is perhaps slow to start, but fast afterwards unless you bloat it with your own crap. And electron is wasteful though, a lot. However, webviews used correctly has no meaningful perf downside. In fact, JS- and web rendering engines are some of the most optimized pieces of code there is.

> [...] abstracts too much of the filesystem away for a desktop app

I'm not sure what you mean? Electron provides the Node APIs directly, which are similar to any other std lib. Speaking of abstracting the file system, have you seen Apple's "bookmarks" they created for persistent file permissions within a sandboxez app? That's abstraction for you.

> [...] doesn't integrate into the OS

Partly true, and it should be better. Any cross platform UI framework is at a disadvantage because native is completely non-standardized. At the same time, web gives you accessibility, zoom, system fonts, rtl, locale etc, so it's much better than most bespoke UI frameworks.

> [...] doesn't use the OS-provided UI widgets

Text fields and similar inputs are native by default. For say sidebar nav, it's again not standardized, so you have to either provide high-maintenance-greatest-common-denominator APIs or trouble the developer with per-OS moving target APIs. I understand why devs don't bother, and as a user I prefer that VSCode works the same across my computers over 2-3 per-OS uncanny valley same-but-different experiences.

> Electron is perhaps slow to start, but fast afterwards

This triggered my JVM PTSD.