4 ms·
It's a huge problem because when you consider what it's really doing (what people want from it) it's not much. All people want from Electron is a GUI system th
by hsn915 5y ago
It's a huge problem because when you consider what it's really doing (what people want from it) it's not much.
All people want from Electron is a GUI system that works on all platforms. In theory there are several libraries that do that but they lack the features people want (QT, GTK).
In a sane world, it will be a single dependency: the GUI library.
You have to be careful when you consider what the system is doing before you justify its complexity. It might be doing a lot of useless work.
For example, what does webpack do? esbuild has proved that webpack is useless and spends its time doing useless work. Bundling with esbuild takes a fraction of a fraction of a second, where as webpack can take anywhere from 30 seconds to several minutes. Yea, it's doing "work", but it's not the work you actually want to do.
All people really want from Electron is the render engine from Chromium and the V8 JS engine, but without the sandbox, so that it can access the file system and do a few other things.
How many of these hundreds of dependencies are contributing to that end? Very very few, if any.
The "modern" web frontend development environment is really bad. Making excuses for it does not help.
- z3t4 5y agoChromium also comes with a lot of API's, for example webGL and WebRTC.
- junon 5y ago> All people want from Electron is a GUI system that works on all platforms No. What those people want is web tech as a GUI library. That's two very different things. A cross-platform GUI library with good customization and theming options and support for custom controls that isn't reliant on the (Google) Web Specs (w3c) is what's really missing from the ecosystem.
- native_samples 5y agoJavaFX meets that requirement. A GUI app that uses JavaFX requires exactly one dependency: the GUI library itself (OK, JavaFX is split into a few different modules). Often you'll add a few open source helpers, e.g. if you want a Material Design theme.
- junon 5y ago> A GUI app that uses JavaFX requires exactly one dependency: the GUI library itself ... and Java.
- native_samples 5y agoYes, that's true. A minimal runtime can be quite small by modern standards (~20mb) but it's not free indeed. Only C or C++ can be "dependency free" in this regard because it's the only languages where operating system vendors are guaranteed to ship the standard library with the OS. All others have to bundle.
- hsn915 5y agoGo is better in this regard because it doesn't even expect much from the OS: everything is bundled.
- native_samples 5y agoThese days you bundle everything with Java apps too. Or at least that's the direction the JVM authors want people to go in (see: jlink and jpackage). It's not a single binary like Go, but in practice that's rarely an issue. Most normal programs have more than one file making them up.