by bengotow · 9y ago · 0 comments
If you have infinite time and need infinitely great performance, writing your own GUI framework on top of each platform's native libraries is probably the way to go. But a huge team of people already built and bulletproofed one called Chromium. It's icky in some ways and abstracted far from the native layer, and it'll probably eat an extra 50ms when someone clicks a button, but you can build and ship a cross-platform app in less than three years. The docs are written, the bugs are known ones, and it's easy to hire people who can help you. Just saying :-)
(full disclosure: I worked on an Electron-based mail client—definitely biased :-) )
I'll rephrase: Chromium is a browser. An extremely full-featured browser, made to support the monstrous complexity and the security minefield of 20+ years of web standards piled on top of each other, and an impressive feat of backwards-compatibility allowing us to view ancient websites as well as modern ones using a vast array of different technologies. Great work.
A lot of current laptops come with limited RAM and disk space.
In light of this, the idea of a Chromium-based tea timer seems a little disconnected with reality. Somehow people still do it.
If you're writing a tea timer perhaps chromium isn't the right tool for the job. I'd certainly be the first to agree and the author highlights this too. If your tiny application doesn't add much functionality, I'd even suggest that a multi platform solution isn't necessary.
However, if you are writing a full featured desktop application, it starts to become a sensible option.
Maybe it only took you 2 days to build, but you can't re-use any of that code when you port it to another platforms; ok, so you rewrite it in 2 days for mac. Sure. Maintenance is a bit of a pain but its no big deal.
...but what if it was an app that took 6 months to build, not 2 days?
You're screwed on the delivery and on the maintenance.
I think the point is that there are many examples of electron based applications like slack that have been hugely successful.
Sure, there are other options you could use instead, and it is bloated, and slow, etc. etc.; but there's no denying that its a successful platform, like it or not.
I definitely appreciate the rapid development aspects of Electron. I've used it myself to build a couple of little one-off apps for specific purposes. But, man, I've got my mail client open 24/7, and if it's going to waste my battery life just sitting there, I'm not likely going to be using it for very long. And if it's laggy when I'm trying to quickly rip through my email...
To indulge this though, I'm just looking at my cumulative CPU time list on this Mac Mini (not a laptop, so I don't care so much about battery draining and I tend to keep things open and forget about them).
TogglDesktop has used 1h27m of CPU time since I launched it. That's, I'm 99% sure, an Electron app. It's a single window that displays a timer and sends the occasional POST request back to the Toggl servers.
Spotify is at 1h23, but at least it's doing a bunch of audio decoding in the background.
Slack has used 56m of CPU time as well.
I'm a little disturbed to see that Excel has used over 22h, and I've barely used it, but forgot that it was open. Closing that now.
As a decent contrast, I used Remote Desktop for approximately 32hr/wk, and it's sitting at 4h51. That is streaming compressed images/video constantly as it runs.