Live data from Hacker News

Electron considered harmful

drewdevault.com

81–90 of 256 posts

Re: Electron considered harmful

#81
sigh

First off, JS is a perfectly usable language. In some respects, it's even great: of the "big three" scripting languages (Python/Ruby/JS), it's the only one that got Lambdas right, and also got closures right (unlike, say, Python). It has sometimes-quirky syntax, and some odd semantics, but they don't bite as often as you'd think.

Second off, I would say that this article is right about the bulk of Electron: It's a pretty massive thing to lug around with your app, and not ideal in any sense. However, if you want to build a UI very fast, there is nothing better than HTML/CSS for it. Except maybe TK.

Speaking of TK, I would actually advocate TK over Electron: it's easy to use, has bindings to pretty much every language out there, and with TTK, it doesn't look like crap.

Finally, "considered harmful" essays rarely do any good, and frequently do harm.

So yes, while I usually like Drew's writing (at least a little: he's good, but far from the best), I wish he had spent the time he spent writing this doing more work on SCAS.

Seriously. If SCAS was actually done, and documented, and usable, that would be great. There is a freaking vacuum of good assemblers for the platform: another one would be nice.

Re: Electron considered harmful

#83
post #33
post #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,…

Essays like these, along with Thanksgiving conversations with older extended family, are what really make me question the wisdom of eternal life. What if all the people stuck in the past like this were with us forever?

Then we might not be doomed to make the same mistakes again every 40 or so years?

Re: Electron considered harmful

#84
This guy is doing his best to make sure we can't have nice things.

> We use [JS] because we have no choice (people who know more than just JavaScript know this). The object model is whack and the loose typing is whack and the DOM is super whack.

Moot point. I use React + TypeScript. Good types and barely ever work with the DOM. If you don't like TypeScript, your favorite programming language probably compiles to JS anyways.

> The reason people choose Electron is because they are too lazy to learn the right tools for the job. This is the worst quality a developer can have.

I agree that bundling a copy of chromium for a todo list app or clipboard manager seems wasteful. But that's an edge case, most people build actual applications. If I'm building a non trivial cross platform app, I'll be orders of magnitude faster on the web stack. I'm not lazy, I just don't want to waste months of my time learning arcane APIs because anything else wouldn't line up with the author's point of view about what the "right" tool is.

Re: Electron considered harmful

#85
post #37

Earlier quoted context omitted.

What if there was a centralized way of accessing HTML + CSS + JS applications? Instead of installing apps, you could just... "download" the necessary files to execute them? Perhaps even on demand from centralized.. "servers"?

> What if there was a centralized way of accessing HTML + CSS + JS applications There is. The major OSs provide APIs to access the platform browser. The downside is you need a platform specific shim to set this up using native code. So, developers need to step outside of their JS worldview for a few days to avoid that 200mb app size penalty. If you are building a platform agnostic app then I understand the value of E…

He was ironically talking about the web.

Re: Electron considered harmful

#86
post #14

This article makes a good point, but what's the alternative? There is no good cross-platform GUI solution. Qt, GTK, JavaFx, wxWidgets, none of them are very good. Electron at least has the advantage of being fully cross-platform and not having to learn a whole new universe if you're already familiar with the web.

For cross-platform apps, Qt is the best I've used. But it does have its warts, and it is big, it will probably bloat your app by about as much as Electron does.

But yeah, there's no one clear winner, which means that Electron is not a uniquely bad choice. Sure, it might be a little heavyweight for a really small simple app, and if you're not aiming for something cross platform your native widget toolkit might be a better idea.

Re: Electron considered harmful

#88

I can understand the author's frustration with popular tools being very simple and somewhat overkill underneath, but I almost take it as a sense of frustration with himself. Electron was built to ship products as soon as possible. Most of the time, no one gives a flying fuck if the tech stack is the "right" choice and as efficient as it can be. I'd be willing to bet my net worth your users don't care at all how you b…

This is both true, but also makes me weep for the state of software development. (Specifically, performance and security)

Re: Electron considered harmful

#89
post #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 allows the world's most popular layout system (HTML+CSS) to be used with one of the world's most popular programming languages Just wanted to name the most obvious alternative: embedded browser component like QtWebKit, which allows to code most of the application logic on the language of your choice. Embedded browsers are the way people have been doing it since circa 2000 (by then, Windows was dominating pl…

But then you can't share the same code between your web application and desktop application. As a company you would have to pay two separate teams to develop each - developer time is expensive. Yes - electron apps are slower and eat more ram - but someone else is paying for that.

Re: Electron considered harmful

#90

Earlier quoted context omitted.

I think the author really has some valid points and he warns you about the rant part. Valid points are: * Electron is often too much for the purpose * it does not look native and the devs don't care * often there are better tools His points about JS being not a good programming language, meh, the language wars are probably never over #SmalltalkIsStillTheBest

> it does not look native and the devs don't care this is not valid. no need to limit our use case to devs, either. at worst, users don't care. at best, users prefer it. see Spotify, Discord, Skype, Sublime, Chrome, Steam... should i keep going? whenever i open an app that uses entirely native controls i just expect the author didn't want to invest any time into making their app look good.

I agree. I never thought about it before, but I have to say that the vast majority of the apps I like the usability in do not look or feel native.

I don't know if there are any studies into what "users" want, but I'm with you. I prefer a UX that fits the app best, not the OS. Especially because in my experience I'm using the same app across multiple OSs and I'd like the same layout in each (within reason)

Post reply on HN