3 ms·
I am working on app that I wrote initialy in electron, but now have moved away from it.I have perspectives on both good and bad sides of electron The good part
by rhl314 5y ago
I am working on app that I wrote initialy in electron, but now have moved away from it.I have perspectives on both good and bad sides of electron
The good parts
Low barrier to entry - if you know javascript you are good to good. No need to learn C++ or Java for building a desktop app.
Truly cross platform - any platforms that chromium supports, electron supports
A very active ecosystem - The community around electron is amazing. I am a big fan of electron.build, things like code signing / auto updates etc are provided out of the box
The not so good parts
IPC hell
Electron has a main process and renderer process and they communicate via events. I found myself swimming in the event soup very often.
Easy to make mistakes
This is more for a note for me or any beginner, but it is easy to write compute heavy code in the renderer and make the ui unresponsive or sluggish. There are many other things like this where it is easy to do things the wrong way.
Security
Electron still has a capable browser which can open any webpage. Mix that with native access and you have a remote code execution vulnerability on your hands.
Bloated binaries
Even the simplest of the electron binaries are large, thats just the nature of electron.
Shameless plug
The app that I am working on is https://loadjitsu.com https://loadjitsu.com, I rewrote it using golang, couldnt be happier.
- zozbot234 5y ago> Electron has a main process and renderer process and they communicate via events. I found myself swimming in the event soup very often. Ironically, this might also be what you need to write a fast non web based client to your app. By keeping the UI renderer is in a separate process, it could be written in any language or technology at all and the "main" app would be none the wiser.
- PhilippGille 5y ago> but now have moved away from it What did you move to? You mention Go, but which GUI framework? Fyne, Gio UI, bindings for GTK or Qt?
- sys_64738 5y ago> Low barrier to entry - if you know javascript you are good to good. No need to learn C++ or Java for building a desktop app. What language would you write the actual app logic in?
- Spivak 5y agoRendering engine and toolkits in C++ but application logic in Python/Ruby/JS with layouts and styling in their own file format. Which describes QT and the Web.