|
| 1 | +--- |
| 2 | +title: Electron |
| 3 | +--- |
| 4 | + |
| 5 | +# Electron |
| 6 | + |
| 7 | +Electron is a popular framework to build cross-platform desktop applications using web |
| 8 | +technologies. Some of the most popular applications using it are [Visual Studio Code], [Slack], |
| 9 | +[Discord], [InVision], [Figma], or [WhatsApp]. |
| 10 | + |
| 11 | +While it was originally created by GitHub in 2013, it is an [OpenJS Foundation][electron-foundation] |
| 12 | +project since 2019. It has an [Open Governance] where engineers from different companies and |
| 13 | +products (like VS Code, Slack, Teams, RingCentral) and volunteers collaborate in different [Working |
| 14 | +Groups]. |
| 15 | + |
| 16 | +Electron applications use Chromium as the shell to render the User Interface. Developers |
| 17 | +use HTML, CSS and JavaScript to build their apps, which means they can use the libraries and tools |
| 18 | +available to the web community such as React, webpack, Babel, etc. One of the main differences with |
| 19 | +other technologies under the _[browser-engine]_ category, is that JavaScript is used to access the |
| 20 | +Operating System features as well. This is because Electron applications come with [Node.js] |
| 21 | +support. At a high-level, [Electron adds the Node.js layer to Chromium's JavaScript engine |
| 22 | +V8][electron-node]. This means that developers can leverate all its ecosystem and also write C/C++ |
| 23 | +code to access features not available out of the box or via other modules. |
| 24 | + |
| 25 | +## Release cadence, version support and update model |
| 26 | + |
| 27 | +Electron has three important branches of development: nightly, beta, and stable. The nightly branch |
| 28 | +is synced to Chromium's development branch and merged daily or weekly. Nightly Electron is |
| 29 | +equivalent to Chrome Canary. The beta and **stable branches of Electron are fixed to their |
| 30 | +major-versions of Chromium and release every 12 weeks**. New Electron stable versions typically |
| 31 | +release the same day as the equivalent stable Chrome release. Additionally, the team releases weekly |
| 32 | +updates (minor and/or patch) for the latest 3 stable versions, bringing the total lifetime of a |
| 33 | +stable version to 36 weeks (or about 9 months). |
| 34 | + |
| 35 | +<!-- Insert diagram here --> |
| 36 | + |
| 37 | +:::caution |
| 38 | +[Chrome has announced][chrome release cycle] that starting in Chrome 94 (Q3 2021) they will switch |
| 39 | +to a 4 week release cadence. Electron will continue releasing every other one and supporting the |
| 40 | +latest 3 major versions. This means that the length of support will change from ~9 months to ~6 |
| 41 | +months. |
| 42 | +::: |
| 43 | + |
| 44 | +Electron applications are self-contained: Chromiun abd Node.js are bundled in the application. This |
| 45 | +has the advantage for the users to not have to install any pre-requisites, and for developers to |
| 46 | +know exactly what dependencies are being run. On the other side, it also means that updating the |
| 47 | +Electron version is a developer responsibility (developer driven). |
| 48 | + |
| 49 | +## Governance |
| 50 | + |
| 51 | +Electron is an OpenJS Foundation project with an established Open Governance model. It has several |
| 52 | +autonomous [Working Groups] (WG) for different areas (API, releases, security). In the words of the |
| 53 | +project: |
| 54 | + |
| 55 | +> A working group is a group of maintainers that is formed to take responsibility for certain |
| 56 | +aspects of the Electron project. Normally these groups will meet regularly but in some cases will |
| 57 | +only meet as required to fulfill their responsibilities. |
| 58 | + |
| 59 | +While the requirements might change from one WG to another, anyone can eventually become a |
| 60 | +maintainer, join, and get their feature added. Electron is created to serve its community, and not |
| 61 | +the needs of a particular company or product. |
| 62 | + |
| 63 | +## Summary |
| 64 | + |
| 65 | +| Characteristic | | |
| 66 | +| :------------- | :----: | |
| 67 | +| Website | [{{technologies.electron.url}}]({{technologies.electron.url}}) | |
| 68 | +| Platforms | Desktop | |
| 69 | +| Type | [browser-engine] | |
| 70 | +| Software type | OSS | |
| 71 | +| License | [MIT] | |
| 72 | +| Copyright | [OpenJS Foundation][electron-foundation] | |
| 73 | +| Documentation | [{{technologies.electron.documentation}}]({{technologies.electron.documentation}}) | |
| 74 | +| Community | [{{technologies.electron.community}}]({{technologies.electron.community}}) | |
| 75 | +| Latest version | {{technologies.electron.releases.0.version}} | |
| 76 | +| Release cadence | Major versions: [12 weeks][release timeline] <br/> Minor/patch: ~weekly | |
| 77 | +| Release support | [9 months][release timeline] | |
| 78 | +| Update model | Developer driven | |
| 79 | +| Governance model | [Open Governance] | |
| 80 | + |
| 81 | +**Platform support:** |
| 82 | + |
| 83 | +{{ table technologies.electron.platforms.{} }} |
| 84 | + |
| 85 | +:::note |
| 86 | +While a mobile Electron could be possible, the [Apple Store policy 2.5.6] will prevent it from being |
| 87 | +distributed on iOS devices. |
| 88 | +::: |
| 89 | + |
| 90 | +**Language support:** |
| 91 | + |
| 92 | +{{ table technologies.electron.languages.{} }} |
| 93 | + |
| 94 | +:::note |
| 95 | +While this list is for the "out of the box" languages, there are ways to use others. An example |
| 96 | +would be Rust, which can be run via [Neon]. |
| 97 | +::: |
| 98 | + |
| 99 | +<!-- Ref links --> |
| 100 | + |
| 101 | +[Apple Store policy 2.5.6]: https://developer.apple.com/app-store/review/guidelines/ |
| 102 | +[browser-engine]: ./browser-engine.md |
| 103 | +[chrome release cycle]: https://blog.chromium.org/2021/03/speeding-up-release-cycle.html |
| 104 | +[Discord]: https://discord.com/ |
| 105 | +[electron-foundation]: https://openjsf.org/blog/2019/12/11/electron-joins-the-openjs-foundation/ |
| 106 | +[electron-node]: https://www.electronjs.org/blog/electron-internals-using-node-as-a-library |
| 107 | +[Figma]: https://www.figma.com/ |
| 108 | +[InVision]: https://www.invisionapp.com/ |
| 109 | +[MIT]: https://github.com/electron/electron/blob/main/LICENSE |
| 110 | +[Neon]: https://github.com/neon-bindings/neon |
| 111 | +[Node.js]: https://nodejs.org |
| 112 | +[Open Governance]: https://github.com/electron/governance |
| 113 | +[release timeline]: https://www.electronjs.org/docs/tutorial/electron-timelines |
| 114 | +[Slack]: https://slack.com/ |
| 115 | +[Visual Studio Code]: https://code.visualstudio.com/ |
| 116 | +[WhatsApp]: https://www.whatsapp.com/ |
| 117 | +[Working Groups]: https://github.com/electron/governance#working-groups |
0 commit comments