I. Introduction to Electron

Electron is a cross-platform desktop application development framework developed by Github that allows you to develop desktop installable software using HTML CSS JS technology.

In fact, the history of desktop application is not long, not to find a variety of information, just by memory, I can think of the desktop application programming language has appeared :C++, Delphi, VB, winForm, WPF, Swing, AWT, QT, Flash, Objective-C, Swift… There may be more.

By 2021-5-15: The Electron Github star has reached 91.8K, then his user number may have exceeded 1 million. Others known as github’s atom editor, Microsoft’s vscode editor, Facebook Messenger, Microsoft Teams, and some of alibaba’s internal software were also developed using electron. Since it’s so hot, just one word: learn.

Github address: github.com/electron/el…

Website: www.electronjs.org/

Why do you want to study Electron

Think of in the network spread very wide word “do not say what C++, Java, old husband walk river’s lake rely on a JS, meet demand roll up sleeves is dry”. Yes, Electron allows us to develop cross-platform desktop software using HTML Css Js front-end technology.

I suggest learning Electron if you have the following requirements:

1. The company has the need to develop desktop applications. (Electron development speed, short development cycle, cross-platform, low maintenance cost)

2. Front-end developers who want to improve their skills need to learn Electron. Everyone knows Electron, so we have to learn it too. (Just because we don’t know doesn’t mean others don’t know.)

3. Develop open source software to promote their own products (e.g. Atom, vscode).

3. Introduction to Nw. js and Electron

Both Nw.js and Electron can use front-end knowledge to develop desktop applications. Nw.js and Electron were originally developed by the same author. Later various reasons are divided into two products. One was named Nw. js (Intel) and the other was named Electron (Github).

Nw. js and Electron can use almost any module in Nodejs. Nw.js and Electron can not only package HTML-written Web pages into cross-platform software that can be installed on a computer, You can also access the operating system’s native UI and apis (control Windows, add menu items, tray application menus, read and write files, and access the clipboard) through javascript.

At present, electron is more commonly used.

Iv. Set up the Electron environment

1. Preparation

1. Nodejs must be installed on your computer. The latest stable version (nodejs.org/en/) is recommended.

2. Installing Git on your computer is recommended

2. Install the Electron environment

npm install -g electron
Copy the code

or

cnpm install -g electron
Copy the code

3. View the Electron version