Live data from Hacker News

Electron considered harmful

drewdevault.com

21–30 of 256 posts

Re: Electron considered harmful

#21
post #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.

Purely out of interest, because I might have used one without even realising it, but could you link some desktop applications written in Java that haven't been sluggish as hell or a bit broken feeling?

Re: Electron considered harmful

#23
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 platform and you could use embedded IE for rendering - the typical app size was much smaller than 200 Mb btw). I remember earning some money on a side project around that time - the CD catalog of bathroom equipment, which I implemented by borrowing huge part of my customer's website and embedding it in CBuilder app with few improvements for richer UX.

Re: Electron considered harmful

#24
post #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…

This makes no sense and completely disregards context.

There are perfectly valid use cases for Electron, and they have absolutely nothing to do with what you said. There are also insane amounts of cross-platform native code written on platform abstractions layers.

> Developers are so into code sharing, write once run everywhere, that they don't stop and ask if they should.

Isn't that the very purpose of Qt or GTK which the article is promoting instead of Electron?

Re: Electron considered harmful

#25
Yeah no. Electron is fine to write desktop apps.

I've seen native app with more ugly UIs and being laggy, etc... For many apps Electron is fine and will perform as well, or even better than native apps (just because, developers you know).

Re: Electron considered harmful

#26

I look at Electron apps the same way I used to look at Adobe Air apps. Any League of Legends player knows how bad the launcher is - 80% the fault of Adobe Air. Sure it was easier to build, but your users suffer for it. Electron apps are pretty terrible performance wise, and you can immediately tell it's an Electron app. - Atom - Slack - GitKraken All of these apps have 'tells'.

And yet the League of Legends client was rewritten from AIR to HTML+JS on top of Chromium...

Re: Electron considered harmful

#27
I dislike JS just as much as the next guy but the only real contender on the list is Qt. Which you need to license for commercial development. Furthermore, even though I like to think that I'm ok in C++, I would really think twice before using it on my next project these days.

The JS performance issues should go away for the most part when wasm is standard. Also a lot of people write some compile to JS language, not JS, so I think that most of the points of this blog will be rendered moot in the near future.

Re: Electron considered harmful

#28
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,…

I disagree, the first case study app revealed flawed logic. lossless-cut is a _visual_ tool for trimming videos. Author derides it by comparing it to the underlying ffmpeg command but that misses the point entirely: I can't magically divine where the start and end is. I need to see the video to determine the times. This tool provides an easy way to see the video and step until I find the right start and end points. There are plenty of frontends to ffmpeg that do similar tasks, and I really wish the author explored some of them to see how they compare to the electron solution.

Re: Electron considered harmful

#29
post #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.

You need to write it in Java? Which is the considered one of the worst language of the new generation.

Re: Electron considered harmful

#30
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,…

> 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.

Using the date as an argument is also poor form. JS is a terrible programming language (I'm not denying that it is a programming language though) regardless of how popular it is (although I think I might be going against the grain here on HN, many people here seem to enjoy node.js).

> 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.

I feel it's unreasonable to turn a single web page into a desktop app by bundling an entire web browser with it.

> ...because they can treat it like any other desktop application -- with hardware access, and subject to the OS' native task management.

If you need direct hardware access it probably isn't well-suited to being a web app in the first place? Why use web technologies for it then?

> 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.

HTML/CSS can be nice to have in such a situation, although a refusal to learn other GUI frameworks probably makes for a poor (native) developer.

The resource bloat and (usually) extreme disparity with the native user interface rarely makes it worthwhile for me to use an electron app. It feels like forcing a square peg into a round hole because the developer is seemingly unwilling to consider more appropriate technologies outside of their comfort zone. Yes, there are well-made electron apps (like VS Code mentioned in the article), but I, personally, would hate for it to become the norm.

Post reply on HN