r/javascript • • Sep 01 '21

Why Electron apps are fine

https://nielsleenheer.com/articles/2021/why-electron-apps-are-fine/
1 Upvotes

39 comments sorted by

50

u/NagaiMatsuo Sep 01 '21

Dismissing everything with "it doesn't matter to me" is not a very good way of proving a point. If these things didn't matter to someone, they wouldn't have been brought up in the first place.

33

u/lhorie Sep 01 '21

I’ve never gotten the feedback during the last ten years: “It’s a nice app, but it would be better if it were a native app”. Not once.

I have. Explicitly. At work, to boot.

Anecdotes are not data, etc. Counterpoints: all the points at the beginning about complaints about slowness/resource consumption, etc. Not everyone is going to explicitly come out and articulate that the problem is your choice of tech unless they are tech-savvy themselves (recall the story about asking people what they want and them responding they want faster horses). But when people say stuff like "Sublime doesn't eat all my laptop battery like vscode does", you, as a developer, ought to take a hint at what that means.

14

u/Snapstromegon Sep 01 '21

This article IMO contains multiple flaws.

It's littered with anecdotal evidance based on the authors situation.

I'm in Germany and the average downloadspeed here is not even 40MBit/s (5MB/s) and you have to consider that for every synchronous 1GBit connection there are multiple "close to nothing" connections. Downloading 400MB takes some time and I remember a couple of days where I literally planned with 1GB/Day to download (I'm living in a city with >25k residents).

Also you're always assuming the perspective of a MacOS User. Mac Apps are huge in comparison to windows apps. E.g. 1password for windows is not even 50MB, my complete Office suite takes less than 3GB.

Also the average diskspace of a user is not 1TB (at least not now), not even on a Mac. Not even close, 1TB is often the maxed out option and many people only have 256GB.

I agree that electron is fine to use and in most cases it's a tradeoff of multiple things deciding what to use, but IMO this article is not a really good take on the matter.

22

u/[deleted] Sep 01 '21 edited Sep 29 '23

whistle grab gaze close tub impolite cooing rainstorm run wine this message was mass deleted/edited with redact.dev

1

u/_ayasin Sep 04 '21

Also "2500 times on my 1TB HD" 🙄. The vast vast majority of people I know do not have ready local access to 1TB on a single machine.

11

u/Pesthuf Sep 01 '21

The problem isn't one tiny electron utility taking all my ram, but multiple Electron apps running next to each other. If every native app were to become an electron app, ooh boy, 32GB would be low end.

I also don't want to dedicate gigabytes of space to multiple copies of Chromium.

I hope Compose for Desktop or Flutter mature to offer everything developers love about Electron without also bringing everything users hate about Electron apps.

6

u/mark-haus Sep 01 '21

Yes electron apps have a place, no that place isn’t everywhere

12

u/JimmytheNice Sep 01 '21

The choice is between an Electron app or no macOS app.

Um, not really - there's also Flutter now.

8

u/asday_ Sep 01 '21

The choice is between an Electron app or no macOS app

So not only do I not have to shit more Electron nonsense into the world, but I can also raise a big long finger to mac users?

I'm fuckin' sold.

8

u/takeyoufergranite Sep 01 '21

And nw.js and neutralino.js

3

u/snejk47 Sep 01 '21

And tauri.

1

u/[deleted] Sep 03 '21

nw.js is just a less supported electron

3

u/[deleted] Sep 01 '21

flutter sucks outside of mobile devices.... flutter web is a total trainwreck.

1

u/JimmytheNice Sep 02 '21

Hardly a trainwreck (I maintain three production apps), but it is a nuisance - especially for someone coming from traditional FE background.

2

u/FerLuisxd Sep 01 '21

Is flutter better than Electron or native in performance terms?

9

u/JimmytheNice Sep 01 '21

Flutter is native.

If you write a Flutter app and build it using a desktop platform, you get a native app, e.g. Windows/macOS.

Whether its performance lives up to "traditional" native apps, that's another question.

2

u/[deleted] Sep 01 '21

It's way faster in my experience.

4

u/bigman446 Sep 01 '21

And somehow, these arguments often come from Apple fans when they discover one of their apps isn’t “native” or when a macOS favourite is considering moving to Electron. How dare they!

Unnecessary.

And at the same time, I don’t care at all. And neither should you.

I'll make my own opinions, thank you.

True. That extra abstraction might mean the app uses more memory than a native app. But memory is there to be used. You paid for it. Why don’t you want apps to use it?

Do I need to point out the stupidity in this argument?

I paid for a car that goes 250 km/h, which means I'll go 250 km/h anywhere I want and any time I want, and so should you /s

(situation is not exactly comparable but I hope you get the point)

4

u/converter-bot Sep 01 '21

250 km/h is 155.34 mph

3

u/davawen Sep 01 '21

good bot

6

u/Reashu Sep 01 '21

I'm not going to complain that "it's an electron app", duh. My complaint is that "it's slow", "it's a memory hog", or "it doesn't integrate with OS features". If you say that's not electron's fault, fine. It's your fault then. I don't care, but you should fix your app.

2

u/pastudan Sep 01 '21

This. Electron just allows you to write bad desktop apps quickly, without much thought or care. Electron itself is not bad, and there are many examples of extremely well behaved electron apps.

2

u/asday_ Sep 01 '21

there are many examples of extremely well behaved electron apps

There's exactly one, isn't there?

3

u/pastudan Sep 01 '21

I assume you mean VScode. But I also don’t mind discord’s performance at all.

3

u/asday_ Sep 01 '21

I put up with Discord's performance because it lets me chill with my bros. The instant a good competitor turns up I'm out.

13

u/tobozo Sep 01 '21

Users only care that it works, not how it works.

No. Developers often think they know what users want, and they're often wrong.

Metaphor: you can't apply that idea to vehicles, food, lifestyle.

15

u/[deleted] Sep 01 '21

If you knew how infotainment systems are developed, you would freak out.

-3

u/tobozo Sep 01 '21

gamification FTW!

11

u/grady_vuckovic Sep 01 '21

I have to disagree. In all my experiences with dealing with users, yes, they do only care if something works 'for them'. They don't care how.

5

u/tobozo Sep 01 '21

it's okay to disagree, some developers can use their empathy, hense the "often" instead of "always"

2

u/_fronix Sep 01 '21

Electron apps is like using an 18 wheeler to move one chair.

2

u/Cody6781 Sep 01 '21

Electron apps are good for exactly two things

  • A team/individual/company who already is very experienced with Web UI development, and they want to quickly make a desktop application.

  • A team/individual/company who already has a successful web application, and want to quickly adapt it to a desktop environment

It is not good for anything else.

If you are a team/individual/company that wants to make a good desktop application that can grow and be maintained in the long term, you should learn or hire the skills to develop natively in that environment.

1

u/sh0rtwave Sep 02 '21

Electron apps ARE great.

In very specific situations, MAINLY WHEN:

You're distributing an application that bundles a REST API to be functional and you want to deliver to a place that has bad internet, so having local assets is important.

Any other example where your application has to talk to your local machine AT ALL at the same time that it's talking to the internet. See above for one example.

Meaning: Your application can connect to the internet, but then you can "save the page" (e.g. saving it's data state) to a file on your drive...that when you open back up, it can still connect to the internet. This bypasses a lot of security-sandboxing that the browser throws around it.

You ONLY NEED this is if you NEED more access to the machine than what you get by default.

(Which, that's a lot. Each 'site' can store extra data in like 4 databases, cookies, whatever, get to video, and other hardware, sensors, etc.)

1

u/grady_vuckovic Sep 01 '21

It depends. If you're creating an application that has requirements, and those requirements are for things such as complex UI layouts that are the same across PC, Mobile and Web, displaying HTML content, audio and video content, etc. Basically, most of the good functionality that Electron comes with out of the box. Then using Electron isn't 'bloat'. It's not like all those extra dependencies to a C++ project would have been zero bytes.

Could you have maybe reduced the application size and memory usage a tiny bit and made the application about 20% more responsive, by coding the whole thing in C++, using Vulkan and a custom GUI toolkit purpose built for your exact project? Maybe.

If you're making a Notepad clone. No Electron is not fine. If you're making, I don't know.. Discord? Yes, yes absolutely, Electron is fine, and down right logical really.

0

u/ordermaster Sep 01 '21 edited Sep 01 '21

If you're making a Notepad clone. No Electron is not fine.

Umm visual studio code is an electron app.

4

u/grady_vuckovic Sep 01 '21

And it's not a notepad clone, so what's your point?