Topics

Featured in Development

Understandability is the concept that a system should be presented so that an engineer can easily comprehend it. The more understandable a system is, the easier it will be for engineers to change it in a predictable and safe manner. A system is understandable if it meets the following criteria: complete, concise, clear, and organized.

Featured in Architecture & Design

Sonali Sharma and Shriya Arora describe how Netflix solved a complex join of two high-volume event streams using Flink. They also talk about managing out of order events and processing late arriving data, exploring keyed state for maintaining large state, fault tolerance of a stateful application, strategies for failure recovery, data validation batch vs streaming, and more.

Featured in Culture & Methods

Tim Cochran presents research gathered from ThoughtWorks' varied clients and projects, and shows some of the metrics their teams have identified as guides to creating the platform and the culture for high performing teams.

GitHub Rewrites its Desktop Client Using Electron

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.

Related Editorial

Related Sponsored Content

Related Sponsor

Aerospike is the global leader in next-generation, real-time NoSQL data solutions for any scale. Aerospike’s patented Hybrid Memory Architecture™ delivers an unbreakable competitive advantage by unlocking the full potential of modern hardware, delivering previously unimaginable value from vast amounts of data at the edge, to the core and in the cloud. Learn more.

Re: Multiplatform desktop applications

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).

Re: Xamarin or Qt

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

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.

Re: Xamarin or Qt

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.