Live data from Hacker News

Electron considered harmful

drewdevault.com

141–150 of 256 posts

Re: Electron considered harmful

#141

Earlier quoted context omitted.

A file manager would not be a good use-case for Electron. Especially if you don't intend to run it in the browser (which really would make no sense.) For the very reason you outlined - startup times. The average use-cases of file managers are being opened and closed very often. Electron is rather aimed at long-running applications you don't usually restart, like Atom and VSCode. Microsoft could've ported VS to other…

> Microsoft could've ported VS to other platforms Aren't they doing exactly this? [1] [1] https://news.ycombinator.com/item?id=12948043

> Since this was an accidental post (now removed) in advance of the actual announcement and release, we've buried this story.

That would explain why this is the first time I hear about it :)

Re: Electron considered harmful

#142

Earlier quoted context omitted.

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.

Should you be sharing that code? Should there be any business logic in the UI, or should it be pushed back into services that can be shared across both?

Maybe not all the code, but you can share lot of the UI behaviour, which is usually quite complicated. This kind of sharing allows you to to have a very similar experience in both places too.

Re: Electron considered harmful

#143

Earlier quoted context omitted.

> Microsoft could've ported VS to other platforms Aren't they doing exactly this? [1] [1] https://news.ycombinator.com/item?id=12948043

> Since this was an accidental post (now removed) in advance of the actual announcement and release, we've buried this story. That would explain why this is the first time I hear about it :)

Except it was announced 2 days later: https://news.ycombinator.com/item?id=12967847

It's not really a port though, just another piece of software labelled "Visual Studio something-or-other".

Re: Electron considered harmful

#144

Earlier quoted context omitted.

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

Valid argument, but only in case if that web app exists. But if it exists and you want to share the code, there's no point in using Electron or building a desktop app at all: you can just create a shortcut on the desktop or even turn it into offline web app in Chrome.

Re: Electron considered harmful

#145

Earlier quoted context omitted.

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

> Yes - electron apps are slower and eat more ram - but someone else is paying for that.

I hope you're being facetious here. If you develop any kind of desktop application and truly believe this, honestly this is disappointing to read.

Re: Electron considered harmful

#146

Earlier quoted context omitted.

Do you mean https://github.com/KnightOS/scas ? It's pretty much done. Documentation is lacking in the repo but there's a detailed man page.

Oh, good. The repo's current documentation indicates that it's deeply unstable, which is why I drew that conclusion.

It could probably stand to be updated. I'll do a pass on the readme now.

Re: Electron considered harmful

#147

Earlier quoted context omitted.

I'm fairly certain electron could easily be modified to be installed once and used as the launcher for its applications. I'm also fairly certain we'll see this in the future. Therefore all claims that electron bloats 200Mb are just temporary. Its still a relatively young technology with huge potential (which also means huge potential for misuse!) I spent 5+ years writing native GUI apps in half a dozen frameworks, I…

Even if the app is smaller on drive, it still takes ~200mb in ram for even the smallest apps.

Dropbox itself takes 200Mb and its a simple python app. Google drive takes 300Mb. VSCode takes about 100Mb of ram with a project opened right now. Even my Emacs takes 250Mb and I literally live inside it.

All of them have at least 2Gb of virtual memory being mapped to them. Yet I still have 9Gb of free ram.

If you want to go against bloat, you might just as well uninstall every single software from your computer, including its OS.

Re: Electron considered harmful

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

The point you're actually making is that the decision to build a desktop app with Electron is almost always a business decision and not a technical one. If you already have all this SPA code that you built, it's going to be cheaper to re-use it and provide the same UI to the end user that they already know from your SPA.

Forget for a second that the performance will be terrible because it's not native code. Forget for a second that a desktop application typically benefits from a more dense UI than a web application, and may benefit from such desktop-only UI features such as separate tooltip windows or OpenGL rendering (yes you can do that in a browser but come on it's not the same). The fact of the matter is that the beancounters typically care less about delivering the best possible UX and more about how their bottom line is going to be affected as they continue the corporate strategy of expending 20% of the effort to get 80% of the potential business benefit.

Electron was built for the beancounters. Not for the HN purists. Simple as that.

Re: Electron considered harmful

#149
post #104

Earlier quoted context omitted.

"a variable is not required to have its type declared nor are types associated with properties" (ECMAScript 2016 spec, 4.2)

Cute. Smalltalk and LISP are terrible too huh?

Lisp is marginally better, because it tries less hard to work around type mismatches (so something like (+ 1 "") is an error). But it suffers from the same fundamental problem: no type checks until runtime.

It's fine to have some kind of option for data whose type isn't known until runtime. This stuff happens, and languages that insist there's no such thing make dealing with it more difficult. But this is the rarer case! Why optimise for it rather than for the more common one?

Re: Electron considered harmful

#150
The fact that electron is easy enough to write trivial apps while at the same time powerful enough to give us VS Code is in my book SPLENDID.

If the trival app is too big for a trival app - who cares. The fact is there is now a serious contender in the cross-platform space that so far has been mainly occupied by Java. Java cross-platform is neither easy nor lightweight. And from what I have seen so far getting started with Electron looks a lot easier.

Post reply on HN