Before looking at the “how” behind Electron, let’s first explore “why” something such as Electron would be desirable. Even though web and mobile apps are becoming ever more powerful and pervasive, desktop applications still have a number of benefits and use cases. From enhanced offline support, to lower level APIs, to simply having a slot in the windows menu or MacOs dock, there is something to the magic of being able to “alt-tab” through an app on desktop, that web based apps just can’t emulate.
Another strong use case for Electron is being able to utilize existing developer skill sets. These days making a desktop application is something of a lost art; there are far more developers these days with strong knowledge of the web stack, compared to knowledge of desktop programming APIs.
Even if you have some developers with knowledge of desktop programming. Native Programming for Windows is completely different from programming for Linux and MacOs. With Electron, you can write the same app and have it run in all three platforms.
Even though cross-OS solutions for writing desktop GUIs have existed for a while now (Java, Python, etc…) there is yet another benefit to the Electron approach. Many apps these days are starting off with a web app, and the desktop app comes after the fact. Even if you were to get cross-platform compatibility with Java, you wouldn’t be able to reuse much — if any at all — of your webapp front end code. With Electron, you can largely reuse all of your web front-end code! This is a huge win in terms of code reuse and productivity; potentially one could reuse the same code base for Web, Android, iOS, MacOs, Windows, and Linux.
How It Is Implemented
Electron is based on Node.js, and it helps to have a basic idea of how Node works before looking at Electron.
Even if you ultimately opt for a true native experience at some point, the quick to market potential of Electron shouldn’t be glossed over!
Feature Image via Pixabay.
Let’s create the next big thing together!
Coming together is a beginning. Keeping together is progress. Working together is success.