Hacker News new | ask | show | jobs
by renehsz 28 days ago
Electron needs to die.

But it's convenient. I can't really fault people for using it.

4 comments

I think the biggest fault in Electron is not just that it's inefficient web tech but that it has no provision for shared instances between apps, instead foricing every app to be the one which only ever wants to use the EXACT locally bundled copy of Chromium+Node which should launch in isolation of any others. This isn't even something Electron needs to die and be replaced for, just an optional feature other similar tools have jumped on for years now.

I'm sure exact pinning is sometimes the real intended case for certain apps, as it is a value in certain ways, but I'd bet at least half the Electron apps I have running now would happily be using the same shared instance of the same LTS Chromium+Node if it were the out of the box behavior to be able to do so.

Back in the Windows era... you could embed Internet Explorer as an ActiveX control in your VB6 app and interface with it, albeit very rudimentary.

Maybe, since Electron has evolved as a somewhat common standard... the major OS providers should get together and revive this idea. The OS provides, similar to say Java JRE, a base runtime of a browser and a JS interpreter with a specified set of helper APIs to use local functionality such as filesystem access, raw networking, notifications, yadda yadda, and apps just call that runtime.

Modern Windows already offers exactly this, including defaulting to evergreen but having the option to bundle, in WebView2 https://developer.microsoft.com/en-us/microsoft-edge/webview...

But they dropped plans to support it on macOS and Linux so it's a bit useless as an Electron replacement. Not that it was exactly a drop in for Electron - it's web based but with a different set of extra APIs. I don't think things will move as fast to something else now that apps are already built on Electron and the savings is for the user rather than the developer. It really needs to be 100% Electron compatible, just with the difference in launch behavior.

The OS's do provide webviews pretty uniformly, and the browser engines they ship with behave more similarly than in the days of IE.
That's not really any different from what Electron does with Chrome except that it includes its own copy of Chrome instead of loading it from system32.

It's a shame common frameworks like ActiveX died, and now everything you want to embed has to be embedded in a different custom way, too.

Yeah, like some kind of web OS.

This is exactly what Palm created in the late '00s. Just like the Amiga, it was a bit too early and kneecapped by sub-par overpriced hardware (and a bad acquisition by HP).

This "c'mon, the system web view is good enough" approach is exactly the point of Tauri.
I'd donate nails for its coffin. Sadly, making unique apps for each platform is just too hard when you're considering the minimum output to create value.

I dream of a day I can transpile a common view/controller language into executables for multiple platforms... without it sucking.

This is probably a good use for a carefully monitored LLM.
We killed off both IE6 and Flash during my web developer career. Eventually the pain of Electron will subside, but it may take a long time.
> I can't really fault people for using it.

We can and we should.

And the alternative for cross platform UI that we should recommend instead is: ___________
native UIs. Platforms look and work differently and it’s annoying and dumb that every app thinks they need to either reinvent the wheel with their own bespoke UI/UX bs or to use ‘native controls’ but completely ignore any actual platform conventions and make the lowest common denominator of everything.