I often see people talking about the fact that they like a certain open-source application, but ‘it’s a shame it’s on Electron’; what does this mean? Is it a privacy thing or a resource thing?
Electron is a framework for desktop development based on Chromium.
It has a big part of Chromium as part of its code but with a wrapper layer to act as a framework.
With it, you can make desktop apps with PWA (Progressive Web Apps).
They like some of it because you can get the beauty of CSS and JS effects in a desktop app, but for every of these apps you end running an independent instance of Chromium.
It doesn’t use system browser engine or one from the installed browsers. Every app you install using it is exactly the same as installing Chrome or Chromium in different folders at your PC and running them at the same time.
This is why they blame it too.
Electron apps is essentially running web apps wrapped as a desktop version. Most of them run like garbage and are always inferior to one made specifically for desktops. The only one I’ve used that runs sensibly is Discord.
As for why people use it, it’s convenient for developers as most of them are familiar with web development and can essentially copy-paste their web application without having to change much.
Electron apps is essentially running web apps wrapped as a desktop version.
worse even: it includes different copies of chromium in each app
Yeah, and since the devs obviously are either too inept to change this or don’t care, they probably never will – this “idea about a runtime mode” issue is open since 2014.
2014 was the same year Microsoft ended support for Windows XP.
So, I assume there’s not an Electron alternative that is able to port internet desktop applications without any privacy or resource issues?
There isn’t an alternative, Electron actually does its job well for what it is. It’s basically a slimmed down browser that’s customizable and runs on all systems, it’s just that it takes a ton of effort to optimize it, and for some reason most people using it aren’t very experienced.
There is Tauri which is very similar but claims to have a lower resource usage and be more secure.
Here are some flaws with Electron:
- High RAM and CPU consumption since it’s based on Chromium
- Electron apps take too much space as they’re bundled with NodeJS and Chromium runtine
- Electron apps tend to be slow
- Terrible sucurity
Ahhh, I see; so, essentially, a combination of both resources and privacy.
An Electron app has full access to your filesystem and to other system resources, the same as any other desktop app
Is there a specific reason or example for why we say it has terrible security here?
Chromium has an incredibly advanced and optimised graphics pipeline and the code that is running in the “web” part of an Electron app benefits from Chromium’s sandbox
Thanks.
People complain about Electron, but without it there would probably be even fewer cross-platform apps today
Some aspects of it might be less than perfect, but let’s not allow perfect to be the enemy of good
Electron doesn’t automatically mean that an app is bad, just like Unity doesn’t automatically mean that a game is good
Completely agree, thanks to Electron we now have many mainstream apps working on Linux and that just wouldn’t have happened otherwise. Whatever technological problems Electron has can be addressed down the road, and are outweighed by the value of lowering the barrier of creating cross-platform applications.
Or you could just use the offline functionality built into browsers nowadays instead of Electron.
Well, electron just sucks. Is just trash. Inmense resource consumption bc chromium.
I always like to think of the fact that space agencies went to the moon on like 2KB of ram, but in 2022 we need 4 GB of ram to run a chat window.
“But nowdays is cheaper” it’s a lazy excuse to not do any proper optimization.
That article that @IngrownMink4@lemmy.ml linked is so good. At the bottom of it, they state: “All you web devs should learn C or Rust. Your program runs on a computer. Learn how to code for one.”
Removed by mod