Easy cross-platform app dev with GitHub's Electron

An application shell for apps built using Web technologies, Electron lets developers use Node.js to build and run desktop applications

Become An Insider

Sign up now and get FREE access to hundreds of Insider articles, guides, reviews, interviews, blogs, and other premium content. Learn more.

GitHub’s Electron is rapidly gaining popularity for building cross-platform applications. An open source application shell for apps built using Web technologies, Electron is a spin-off of GitHub’s famed Atom editor.

Electron is based on Node.js and HTML5, so it has gained broad support; companies like Microsoft are using it to build its Visual Studio Code and Slack for the desktop endpoints of its collaboration platform. In fact, Electron is perhaps best thought of as a way to use Node.js to build and run desktop applications.

Architecturally, Electron is relatively simple: It uses a Chromium frame to wrap JavaScript code running on Node.js. This approach makes it relatively easy to bring familiar Web application technologies to the desktop, letting you quickly convert your existing code into a desktop tool, with Node.js providing low-level API access to the underlying operating system.

If you’ve built a single-page Web app that can run on Node.js, you can build and deliver an Electron app. While you can have multiple widows in Electron, they remain under the control of a main process and are displayed using separate renderers. Views are isolated from each other, so all communications between windows must take place through the main process.

Electron enables you to build relatively complex applications quickly. That’s not surprising because it was originally designed as the host for GitHub’s Atom development environment. It’s flexible enough to let you start simply, then build more complex code over time.

Spinning up Electron

To continue reading this article register now