This tutorial we learn Electron
the basics, let's first learn what is Electron
.
What is Electron
Electron
is an open source framework developed by GitHub
It allows the use of Node.js
(as backend) and Chromium
(as frontend) to complete the development of GUI
Electron
can be used to build cross-platform desktop applications HTML
, CSS
, JavaScript
Chromium
by contracting 060b241e50b57e and node.js
a running environment, and the application can be packaged into Mac
, Windows
and Linux
development path
In 2013, the Atom
editor came out, and as the underlying framework Electron
was gradually known to implement it, it was open sourced in the spring of 2014, when it was still called Atom Shell
. In the next few years, Electron
is constantly updated and iterated, and there is a major milestone almost every year:
- In April 2013,
Electron
started under the nameAtom Shell
- In May 2014,
Atom
andAtom Shell
were open sourced under theMIT
license. - In April 2015, the project was renamed
Electron
. - On May 11, 2016, the electronic version
v1.0.0
released. - On May 20, 2016, it was allowed to submit software packages to the Mac App Store.
- August 2, 2016, support Windows Store
- 2.0.0 released on May 2, 2018
Support platform
Currently, the platforms that Electron
OS X
, Windows
, Linux
:
OS X
: For theOS X
system, there are only 64-bit binary files, and the minimum supported version isOS X 10.8
.Windows
: OnlyWindows 7
and later versions are supported. The previous version does not work. ForWindows
x86
andamd64
(x64) versions are provided. It should be noted that theARM
version ofWindows
is not currently supported.Linux
: precompiledia32
(i686
) andx64
(amd64
) versionElectron
binaries are inUbuntu 12.04
compiled under,arm
version of the binary file is inARM v7
(hardware floating pointABI
completed under the Debian Wheezy version of NEON). Whether the pre-compiled binary file can run depends on whether it includes the library linked by the compilation platform, so onlyUbuntu 12.04
can guarantee normal operation, butUbuntu 12.04+
,Fedora 21
,Debian 8
etc. have also been confirmed to run the pre-compiled version of Electron.
Pros and cons of Electron
Electron
are as follows:
- It is easy to deploy and upgrade, and users can access it through a browser.
HTML/JS/CSS
written, convenient and efficient.- It can support
Windows
,Linux
,Mac
systems.
Electron
are as follows:
- For developers: browser adaptation is more cumbersome. Some applications must specify the browser version (for example,
OCX
must be theIE
kernel,H5
must be a higher version), the browser must be opened, and a long string ofURL
addresses must be entered. - For users: Some users in traditional industries are
web
applications, especially when using professional tool software. Most of them feel thatweb
applications are not as practical as desktop applications.
Software based on Electron
Electron
has been used by a number of open source applications. Among them, the Atom
, Alipay applet IDE
, and Visual Studio Code
editors that are well-known and used by programmers are implemented Electron
We open the Visual Studio Code
editor and find "Help --> Switch Developer Tools" in the menu, as shown below:
Then you can see the familiar Chrome devtool
on the interface, as shown in the following figure:
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。