Live data from Hacker News

Electron considered harmful

drewdevault.com

1–10 of 256 posts

Re: Electron considered harmful

#2
Electron, and to a great extent the cross platform fetish, is a perversion of DRY. They don't want to write the same code for two platforms. But its usually not the same code. Its the same logic implemented on two different platforms. Developers are so into code sharing, write once run everywhere, that they don't stop and ask if they should. In every case you are paying a price for abstraction, like running Electron or using a WebGL canvas instead of a native graphics API. The article highlights cases where they price was paid, but the app was still platform specific.

Re: Electron considered harmful

#3
This had me for the first half, where the author walks you through the 'case study' applications that offer minimal functionality despite shipping with an entire browser inside.

But then the essay turns into a rant. It's 2016, people, the ship has sailed on pretending JS isn't a real programming language. Phrasing the argument the way he does just betrays his smug elitism.

The fact is, for many types of applications, Electron is a really good fit: for example, shipping a single-page webapp as a desktop app, a need that surfaces often in today's world, despite his derision of this concept.

An Electron-wrapped SPA is safer than going to the same website in a multi-tabbed browser and co-mingling your disparate cookies in the same jar, not to mention more convenient for the users, because they can treat it like any other desktop application -- with hardware access, and subject to the OS' native task management.

For other apps, Electron allows the world's most popular layout system (HTML+CSS) to be used with one of the world's most popular programming languages. This is a huge boon for re-using knowledge, and perhaps does lead to some amateurish projects. Similar criticisms were leveled towards Visual Basic, where drag-and-drop composing and a good IDE enabled people to quickly crank out a GUI app from an idea.

Re: Electron considered harmful

#4
See, I totally agree with this essay.

But what are the alternatives? Getting started with Qt/GTK isn't nearly as easy, for example.

Maybe someone should write an intro to native GUI programming for JS devs.

Re: Electron considered harmful

#7
post #4

See, I totally agree with this essay. But what are the alternatives? Getting started with Qt/GTK isn't nearly as easy, for example. Maybe someone should write an intro to native GUI programming for JS devs.

What's wrong with JavaFX? I don't ever see it recommended, but a lot of us can do Java, and from my experience, it's way better than swing or awt.

Re: Electron considered harmful

#8
As some of who's had to support Qt, wxWidgets and other crazy x-platform UIs I find electron refreshing.

Heck, I've got Rust talking to node.js in it. Elm for the front-end and Rust for the processing, it's a surprisingly pleasant development experience.

Re: Electron considered harmful

#10
If electron apps had a smarter way to manage chrome core as a dependency, the file size would be peanuts. Every apps is download on the same bundled core. Once this happens you won't have 100mb sizes. An intelligent installer could check core, if not installed download and install otherwise use what's on the system.
Post reply on HN