BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

GitHub Rewrites its Desktop Client Using Electron

| by Sergio De Simone on May 16, 2017. Estimated reading time: 3 minutes |

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

Adoption Stage
Style

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.

Tell us what you think

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

Email me replies to any of my messages in this thread

Multiplatform desktop applications by Javier Paniza

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

Re: Multiplatform desktop applications by Sergio De Simone

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

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

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

3 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT