Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News GitHub Rewrites its Desktop Client Using Electron

GitHub Rewrites its Desktop Client Using Electron

Leia em Português

This item in japanese


GitHub moved away from the native implementations of its macOS and Windows clients and replaced them with a complete rewrite based on Electron, announced GitHub’s director of client applications Phil Haack. Along with GitHub Desktop Beta, GitHub has also introduced a new beta of Atom sporting out-of-the-box Git and GitHub Integration.

As the team behind the rewrite explained, the key reason for GitHub to rebuild their desktop client from scratch was minimizing the cost of supporting multiple platforms. Indeed, developing native apps for Windows and macOS required using two completely different stacks, which meant having to implement, debug, and maintain each feature twice. Similarly, adding support for a third platform like Linux would have required a separate effort.

As it turns out, building native apps for multiple platforms doesn’t scale.

The GitHub team quickly converged on basing their new app on Web technologies, specifically Electron and TypeScript. Among the advantages of using Web technologies, the code-build-run cycle went down from minutes to seconds, with code changes reloading in place and the possibility of live-tweaking their design. Yet, using Web technologies to build desktop apps is not without its own set of limitations and constraints:

The web isn’t a perfect platform, but native apps aren’t built on perfect platforms either. Rewriting on Electron does mean swapping one set of trade-offs for another.

This is where using Electron paid off, explain the developers, since it gave them the chance to tweak things by extending Electron on top of the platform-specific API.

After about one year of development, the new Electron-based client can be now downloaded or forked. InfoQ has spoken with Phil Haack to learn more about their commitment to Electron.

Since its introduction, Electron has been chosen as the foundation for many notable apps. How would you describe the role Electron plays in the current arena of solutions to write cross-platform code solutions?

Phil Haack: Electron leverages the success of the web becoming a first-class platform; over time, Electron and the web are headed in the same direction, just from opposite ends. The fact that users can leverage folks with web-technology skills to build desktop apps is part of Electron’s success.

There has been a rather heated discussion recently on Reddit where Electron was dubbed “Flash for Desktop” — mostly due to its memory requirements and performance. What arguments would you propose to developers that are critical of Electron to better understand why it is an important technology?

Haack: As I mentioned before, Electron has hitched its wagon to the success of web technologies as a platform. As Chromium, Node, JavaScript, HTML, CSS, etc. continue to improve under the weight of huge investments in our industry, like from Google, Microsoft, Facebook, Slack, GitHub, and many others – Electron benefits as a result. That’s a lot of firepower directed at these set of tools. Thus, for those critical of Electron, I’d note the general history of these technologies, how they’ve improved and how they will continue to improve. We’re having many good conversations about improving Electron.

How much would you like Electron on mobile? Any chance that we will get there, in your opinion?

Haack: We’ve heard from our community that this is something they’d like to see, but given that Chromium is 90% of the codebase, we’re bound to places where Chromium and Node.js can run. That eliminates iOS and makes Android difficult. There’s a great opportunity here for the creation an API-compatible implementation.

As mentioned, GitHub has also announced a new Git and GitHub Integration for Atom, available in Atom 1.18 beta, with the goal of allowing developers to manage their Git workflows from within the editor, thus reducing the context switching implied by dropping to the command line or a separate tool.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Multiplatform desktop applications

    by Javier Paniza,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    We did that in 1998 using Java. You're 19 years behind (really 22 years).

  • Re: Multiplatform desktop applications

    by Sergio De Simone,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    That is surely true. On the other hand, it seems to me that while Java is well established on the server side, the Java idea of "write once, run everywhere" has lost some appeal, hence the new interest in JS-based solutions for cross-platform development. Now, if that is right, the question would be why what Java provided already 20 years ago has stopeed appealing the industry. And why JavaScript? Is it just a fad? We'll see in twenty uears (or less).

  • Xamarin or Qt

    by Daniel Serodio,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Would be much better choices. Electron is indeed Flash for the desktop.

  • Re: Xamarin or Qt

    by Andrew Hirst,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Except you don't want to write it multiple times, which is the whole point of this article. They have code written in web technologies that they want to reuse across a desktop install across multiple platforms and at the same time have access to native operating system API's. Electron is absolutely the best choice here.

  • Re: Xamarin or Qt

    by Sergio De Simone,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Thanks for mentioning this. Indeed, that was one of the issue I brought up with Phil Haack -- hoping to get something more cogent as a reply, actually.

    There is surely something true in the claim that Electron is Flash for the Desktop. On the other hand, what possibly killed Flash was its lack of security and stability, not so much its cost in terms of performance and page-bloat -- and it is also evident by now that Flash was not the culprit for page-bloat, either.

    I agree that Xamarin is a very good option -- as it is Qt, although its lack of native UI maybe a showstopper -- but they address a different set of platforms (desktop + mobile vs. web + desktop). This is just to say that maybe we do not have yet the "kill tech", and possibly never will.

    All in all, I hope that the majority of apps I use on a daily basis will not be Electron-based, but if Electron can be the key to having a desktop app for Linux, Mac, and Windows, quickly out of the door, then it could be do good.

    For the rest, time will tell.

  • Re: Xamarin or Qt

    by Sergio De Simone,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Yes, that pretty is pretty much correct, in my view. It's always a matter of constraints and requirements leading to choose a piece of technology instead of another.

    Basically, if you have a web app and you want to bring it to the desktop with native feel, Electron is a good option, with its costs and benefits. The same can be argued for React Native when the platforms involved are web + mobile, and for Xamarin on desktop + mobile.


Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p