3 ms·
Disclaimer: These opinions are my own and may not reflect the thoughts of other people who dislike Electron. I’ve been making command-line tools for a long tim
by latexr 3y ago
Disclaimer: These opinions are my own and may not reflect the thoughts of other people who dislike Electron.
I’ve been making command-line tools for a long time. At one point I had several ideas for non-commercial macOS apps to scratch my own itches. The ideas were simple and self-contained: One was a menubar app, another loaded a specific website and added stuff to it, and so on.
So I started looking into macOS development. I found Apple’s documentation atrocious, and while there are infinite third-party guides on iOS development, macOS apps has less than a handful and they’re all outdated. So I looked into Electron and was sold. The documentation was fantastic and I could build what I wanted. I built my apps and they were good. The file size was enormous but performance and resource consumption was better than any other Electron app I had used. Higher than native for sure, but due to the lack of resources to learn, the alternative would have been for those apps to not exist.
All was well, until time passed. Contrary to what I see people mentioning all the time, it is possible for software to be done. I have done it multiple times. I have several tools that work exactly as I want and no longer need to touch. Not so with Electron and NPM. There are so many dependencies for everything. I avoid third-party dependencies as much as I can, but with Electron and NPM that’s next to impossible. And every dependency depends on a ton of other different crap, their APIs are always changing, and new security holes are popping up all the time. Every time I wanted to make a new Electron app, or make a small feature addition, or even just update packages, I’d have to reread documentation and rewrite parts of my application.
Screw that. I don’t want to spend my life babysitting software. Especially when I know the alternative exists.
Then I started noticing a ton of other problems with the overwhelming majority of Electron apps. They are slow. You open them and there’s a moment when the interface is still loading; the controls never look quite right; they lack support for automation features like AppleScript; they consume more energy; they noticeably bog down the system when you have several of them open. You’re constantly being reminded the app is not native, it’s a bad experience.
Eventually I transitioned from scripting languages to Swift, and while I don’t typically make GUI apps and the experience can be frustrating at times, it is always rewarding when I finish a project and don’t have to touch it again unless I want to. Like any hard and interesting problem in life should be. The other day I was obsessing over how adding a feature to my command made it go from running in 6 milliseconds to 7. Good problem to have.
Look, I don’t like software wars. Use whatever the heck you want for yourself. But I for one avoid Electron because apps are always worse than they could be, and the reason I became a developer in the first place was to have the ability to make computers behave how I want. Thankfully this is a sentiment shared by the best indie developers. I’d rather be in that company.