0%

Book Description

Electron is currently the most popular framework and runtime for creating cross-platform desktop applications with web technologies. Maintained by GitHub, Electron combines Chromium’s rendering library with Node.js and C++ to power apps such as Slack and Visual Studio Code. This short, hands-on guide introduces each aspect of developing and distributing your own apps with this framework.

Author Felix Rieseberg, a staff engineer at Slack, begins by explaining how Electron’s modules and APIs generally work. You’ll then learn how to build an app from ground up and how to integrate it with your operating system for a native user experience.

  • Learn Electron’s fundamental patterns and most commonly used modules and APIs
  • Build flexible user interfaces that can display windows in any size, shape, or opacity
  • Understand the process for shipping an Electron app: packaging, creating installers, and enabling automatic updates
  • Explore core considerations for developing apps with Electron: performance, community support, and framework shortcomings

Table of Contents

  1. 1. What Is Electron?
    1. Building Desktop Apps with Chromium, Node.js, and C++
    2. Main and Renderer Processes
    3. Node.js in the Browser
  2. 2. Introduction to Electron
    1. Hello World: A Small Code Editor
    2. Project Structure
      1. Starting the Application
      2. Opening the First Window
      3. Using Node.js in the Renderer Process
  3. 3. Working with Electron
    1. User Interfaces with BrowserWindows
      1. Showing Windows Gracefully
      2. Configuring the Web Page with webPreferences
      3. Multiple Windows and Threads
      4. Inter-Process Communication
      5. Performance Considerations
      6. Native Menus
      7. Native Dialogs
      8. Warning, Error, and Information Dialogs
      9. Open and Save Dialogs
      10. Native Notifications
      11. Ensuring Security
      12. Safely Displaying Remote Content
  4. 4. Binaries, Installers, and Updates
    1. Packaging the Application
    2. Configuration
    3. Creating Installers
    4. Enabling Automatic Updates
      1. Providing an Update Server
      2. Implementing the Update Logic
  5. 5. Considering Electron
    1. Performant Web Applications
      1. Optimizing with Performance Profiles and Developer Tools
    2. The Ecosystem and Community
    3. Where Electron Falls Short
      1. An Outsider on All Platforms
      2. Code Outside of Your Control
      3. Bigger Than Necessary
      4. Native Interfaces
    4. Closing Remarks
3.16.51.3