In Defence Of Electron II
Thu, 18 Jan 2018
I first published this on Dev.to
Web technology is for the web. Leave it there.
Electron is a disgrace to the programming community.
Software devs who ignore the engineering principles of yesterday in favor of hogging resources because it’s convenient for you are what’s wrong with the world today. People like you are dragging down the software industry by adding garbage to your apps faster than hardware can expand. This needs to stop.
Wow. Probably not the reaction fellow Electron devs would have hoped for but one we have come to expect. Given all the hate, I would like to take the time to offer my own defence of Electron.
Let’s start with the two Electron apps I have created: Browserosaurus and SpotSpot.
A browser prompter for macOS. It works by setting itself as the default browser; any clicked links in non-browser apps are now sent to Browserosaurus where it’ll present you with a menu of all your installed browsers. You may now decide which browser you’d like to continue opening the link with.
I first created this because at work I do not really have a default browser; often opening links from email, Slack, Terminal etc. and then copying the link from the opened browser into the browser I intended it for. I also like that it allows me to back-out of opening a browser by simply hitting escape or clicking outside Browserosaurus’s picker window.
When first looking for a solution, I found there were various apps in existence but none that quite offered the simplicity of what I wanted. It basically came down to: “how hard can it be?”. Once I had figured out how to scan the system for installed apps, the rest fell into place.
An always on-top, mini-player for controlling Spotify in macOS. It shows the current album art, track and artist names, and displays player controls when rolled over with the mouse.
This one had a simple requirement: I like to know what is playing at a glance. Most other solutions I found for this involved sticking the currently playing track in the menubar. Two reasons I prefer my approach: firstly, I originally had a 13” MacBook and the menubar was already crammed full of indicators that I like to always have in view. Secondly, I get to see the great album art.
I designed SpotSpot to look like the now-playing widget in iOS’s control centre. I like the 1:1 (square) ratio of the window and how I can shrink it right down to be tucked away in a less-used area of my screen.
I thought this was a post about defending Electron?
If we must talk about system usage, both my apps idle at essentially 0% CPU and use about 100MB of RAM, which is just fine by me.
Thank-you for reading and despite my emphasis on these being my projects, I am always happy to hear suggestions and review pull-requests for any of my open source projects.
Happy coding :)
If you would like to comment on this post, feel free to tweet me @will_stone_