Chapter 12. Conquering the desktop with Electron

 

This chapter covers

  • Building desktop apps with Electron
  • Showing desktop menus
  • Sending desktop notifications
  • Creating cross-platform builds

In the preceding chapter, you learned about building command-line tools with Node. Node is starting to become prominent in another area, however: desktop software. Programmers are increasingly harnessing web technology to solve the problems of cross-platform development. In this chapter, you’ll learn how to make a desktop web application based on native desktop features, Node, and client-side web technology. You can develop and run this application in Linux, macOS, and Windows. You’ll also use Node modules in a model that isn’t too far removed from client-server web application development.

12.1. Introducing Electron

Electron, originally known as Atom Shell, enables you to build desktop applications with web technology. The application and user interface are left up to you to create with HTML, CSS, and JavaScript, but some of the “hard parts” of desktop software are provided for you. These include the following:

  • Automatic updates
  • Crash reporting
  • Installers for Microsoft Windows
  • Debugging
  • Native menus and notifications

Some famous applications have been made with Electron. The first was Atom, GitHub’s text editor, but more recent applications include Slack, the popular chat service, and Visual Studio Code by Microsoft, shown in figure 12.1.

12.2. Creating an Electron app

 

12.3. Building a full desktop application

 
 
 

12.4. The React app

 
 

12.5. Builds and distribution

 
 
 
 

12.6. Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage