Electron (software framework)
{{Short description|Development framework built on Chromium}}
{{Use dmy dates|date=June 2020}}
{{Infobox software
| name = Electron
| logo = Electron Software Framework Logo.svg
| logo size = 64px
| screenshot = Electron 20.0.3 screenshot.png
| author = GitHub
| developer = OpenJS Foundation
| released = {{Start date and age|df=yes|2013|7|15}}{{cite web|url=https://github.com/electron/electron/releases/tag/v0.1.0|title=electron/electron|website=GitHub|access-date=8 May 2018|archive-date=2 August 2016|archive-url=https://web.archive.org/web/20160802143311/https://github.com/electron/electron/releases/tag/v0.1.0|url-status=live}}
| latest release version = 36.2.0{{cite web|url=https://github.com/electron/electron/releases/tag/v36.2.0|title=Release electron v36.2.0 · electron/electron|date=7 May 2025|website=GitHub|access-date=7 May 2025}}
| latest release date = {{start date and age|2025|05|07}}
| latest preview version = 37.0.0-alpha.3{{cite web|url=https://github.com/electron/electron/releases/tag/v37.0.0-alpha.3|title=Release electron v37.0.0-alpha.3 · electron/electron|date=5 May 2025|website=GitHub|access-date=7 May 2025}}
| latest preview date = {{start date and age|2025|05|05}}
| programming language = C++, JavaScript, Objective-C++ and Objective-C
| operating system = Linux, macOS, and Windows
| platform = IA-32, x86-64, ARM
| license = MIT License{{cite web|title=electron/LICENSE at master|url=https://github.com/electron/electron/blob/master/LICENSE|website=GitHub|access-date=3 July 2020|archive-date=12 May 2017|archive-url=https://web.archive.org/web/20170512183219/https://github.com/electron/electron/blob/master/LICENSE|url-status=live}}
| website = {{official URL}}
}}
Electron (formerly known as Atom Shell{{cite web|last1=Sawicki|first1=Kevin|date=23 April 2015|title=Atom Shell is now Electron|url=https://www.electronjs.org/blog/electron|url-status=live|access-date=6 January 2022|work=Electron|archive-url=https://web.archive.org/web/20171109205411/http://electronjs.org/blog/electron |archive-date=9 November 2017 }}) is a free and open-source software framework developed and maintained by OpenJS Foundation.{{cite web |url=https://www.electronjs.org/ |title=Build cross-platform desktop apps with JavaScript, HTML, and CSS | Electron |access-date=February 1, 2023 |archive-date=9 May 2022 |archive-url=https://web.archive.org/web/20220509124521/https://www.electronjs.org/ |url-status=live }} The framework is designed to create desktop applications using web technologies (mainly HTML, CSS and JavaScript, although other technologies such as front-end frameworks and WebAssembly are possible) that are rendered using a version of the Chromium browser engine and a back end using the Node.js runtime environment.{{Cite web|url=https://electronjs.org/blog/electron-internals-using-node-as-a-library|title=Electron Internals: Using Node as a Library|website=electronjs.org|date=8 August 2016|access-date=3 July 2020|archive-date=9 November 2017|archive-url=https://web.archive.org/web/20171109205326/https://electronjs.org/blog/electron-internals-using-node-as-a-library|url-status=live}} It also uses various APIs to enable functionality such as native integration with Node.js services and an inter-process communication module.
Electron was originally built for Atom and is the main GUI framework behind several other open-source projects including GitHub Desktop, Light Table,{{cite web|last1=Horner|first1=Gabriel|title=Light Table 0.8.0|url=http://lighttable.com/2015/12/10/light-table-0-8-0/|date=10 December 2015|access-date=3 July 2020|publisher=lighttable.com|archive-date=13 December 2015|archive-url=https://web.archive.org/web/20151213173414/http://lighttable.com/2015/12/10/light-table-0-8-0/|url-status=live}} Visual Studio Code, WordPress Desktop,{{cite web|url=https://github.com/Automattic/wp-desktop|title=GitHub Repository|website=GitHub|access-date=16 June 2019|archive-date=19 February 2016|archive-url=https://web.archive.org/web/20160219194955/https://github.com/Automattic/wp-desktop|url-status=live}} and Eclipse Theia.{{Cite web|title=Theia - Cloud and Desktop IDE Platform|url=https://theia-ide.org/|access-date=2021-12-31|website=theia-ide.org|archive-date=20 April 2018|archive-url=https://web.archive.org/web/20180420143515/https://theia-ide.org/|url-status=live}}
Architecture
Electron applications include a "main" process and several "renderer" processes. The main process runs the logic for the application (e.g., menus, shell commands, lifecycle events), and can then launch multiple renderer processes by instantiating an instance of the {{code|BrowserWindow|javascript|style=font-weight: bold; color: green;}} class, which loads a window that appears on the screen by rendering HTML and CSS.{{fact|date=October 2024}}
Both the main and renderer processes can run with Node.js integration if the {{code|nodeIntegration}} field in the main process is set to {{code|true|javascript}}.{{fact|date=October 2024}}
Most of Electron's APIs are written in C++ or Objective-C and are exposed directly to the application code through JavaScript bindings.{{Cite web|url=https://electronjs.org/blog/from-native-to-js|title=From native to JavaScript in Electron {{!}} Electron Blog|website=electronjs.org|date=19 March 2019|access-date=2019-04-26|archive-date=26 April 2019|archive-url=https://web.archive.org/web/20190426032159/https://electronjs.org/blog/from-native-to-js|url-status=live}}
History
In September 2021, Electron moved to an eight-week release cycle between major versions to match the release cycle of Chromium Extended Stable and to comply with a new requirement from the Microsoft Store that requires browser-based apps to be within two major versions of the latest release of the browser engine.{{Cite web|url=https://electronjs.org/blog/8-week-cadence|title=New Electron Release Cadence | Electron|date=14 July 2021|website=electronjs.org|access-date=9 February 2022|archive-date=14 July 2021|archive-url=https://web.archive.org/web/20210714162435/https://electronjs.org/blog/8-week-cadence|url-status=live}}
Electron frequently releases new major versions along every other Chromium release. The latest three stable versions are supported by the Electron team.{{Cite web |title=Electron Releases {{!}} Electron |url=https://electronjs.org/docs/latest/tutorial/electron-timelines |access-date=2022-12-16 |website=electronjs.org |language=en |archive-date=16 December 2022 |archive-url=https://web.archive.org/web/20221216134548/https://www.electronjs.org/docs/latest/tutorial/electron-timelines |url-status=live }}
Usage
{{Main|List of software using Electron}}
Desktop applications built with Electron include Atom,{{cite web |last1=Sawicki |first1=Kevin |date=23 April 2015 |title=Atom Shell is now Electron |url=https://electronjs.org/blog/2015/04/23/electron |url-status=dead |archive-url=https://web.archive.org/web/20191016124310/https://electronjs.org/blog/electron |archive-date=16 October 2019 |access-date=15 July 2017 |work=Electron}} balenaEtcher,{{cite web |title=Etcher on GitHub |url=https://github.com/balena-io/etcher |url-status=live |archive-url=https://web.archive.org/web/20181116012922/https://github.com/balena-io/etcher |archive-date=16 November 2018 |access-date=7 July 2020 |website=GitHub}} Eclipse Theia, Microsoft Teams before 2.0,{{Cite web |last=msdmaguire |title=How Microsoft Teams uses memory - Microsoft Teams |url=https://docs.microsoft.com/en-us/microsoftteams/teams-memory-usage-perf |url-status=live |archive-url=https://web.archive.org/web/20201208013106/https://docs.microsoft.com/en-us/microsoftteams/teams-memory-usage-perf |archive-date=8 December 2020 |access-date=2021-11-12 |website=docs.microsoft.com |language=en-us}}{{cite web |last1=Redmond |first1=Tony |title=Teams 2.0 Moves Away from Electron to Embrace Edge WebView2 |url=https://office365itpros.com/2021/06/25/teams-2-webview2-replaces-electron/ |website=Office 365 for IT Pros |date=25 June 2021 |access-date=2 August 2024}} Slack,{{cite news |date=25 October 2016 |title=Building hybrid applications with Electron |url=https://slack.engineering/building-hybrid-applications-with-electron-dc67686de5fb |url-status=live |archive-url=https://web.archive.org/web/20191016124311/https://slack.engineering/building-hybrid-applications-with-electron-dc67686de5fb?gi=b2a5127226ea |archive-date=16 October 2019 |access-date=12 August 2017 |work=Several People Are Coding}} and Visual Studio Code.{{cite web |last1=Bright |first1=Peter |date=29 April 2015 |title=Microsoft's new Code editor is built on Google's Chromium |url=https://arstechnica.com/information-technology/2015/04/microsofts-new-code-editor-is-built-on-googles-chromium/ |url-status=live |archive-url=https://web.archive.org/web/20150507020146/https://arstechnica.com/information-technology/2015/04/microsofts-new-code-editor-is-built-on-googles-chromium/ |archive-date=7 May 2015 |access-date=18 November 2015 |work=Ars Technica}}{{cite web |date=29 March 2022 |title=Open Source project |url=https://github.com/Microsoft/vscode |url-status=live |archive-url=https://web.archive.org/web/20151123164810/https://github.com/Microsoft/vscode |archive-date=23 November 2015 |access-date=20 May 2018 |website=GitHub}} The Brave browser was based on Electron before it was rewritten to use Chromium directly.{{cite web |last=Singh |first=Jagmeet |date=2017-01-03 |title=People are now even doing machine learning in JavaScript |url=https://www.opensourceforu.com/2017/01/javascript-creator-brendan-eich-interview/ |url-status=live |archive-url=https://web.archive.org/web/20170107122039/https://www.opensourceforu.com/2017/01/javascript-creator-brendan-eich-interview/ |archive-date=7 January 2017 |accessdate=2022-08-26 |publisher=Open Source For U}}
Reception
The most common criticism of Electron is that it necessitates software bloat when used for simple programs.{{cite web |last=Proven |first=Liam |date=2021-11-19 |title=Some FOSS gems: Franz, RamBox, Pidgin and more |url=https://www.theregister.com/2021/11/19/friday_foss_fest/ |url-status=live |archive-url=https://web.archive.org/web/20211119235239/https://www.theregister.com/2021/11/19/friday_foss_fest/ |archive-date=19 November 2021 |accessdate=2022-08-26 |publisher=The Register}} As a result, Michael Larabel has referred to the framework as "notorious among most Linux desktop users for being resource heavy, not integrating well with most desktops, and generally being despised."{{cite web |last=Larabel |first=Michael |date=2019-02-09 |title=Electron Apps Are Bad, So Now You Can Create Desktop Apps With HTML5 + Golang |url=https://www.phoronix.com/news/HTML5-Golang-Desktop-Apps |url-status=live |archive-url=https://web.archive.org/web/20220826131838/https://www.phoronix.com/news/HTML5-Golang-Desktop-Apps |archive-date=26 August 2022 |accessdate=2022-08-26 |publisher=Phoronix}}
Researchers have shown that Electron's large feature set can be hijacked by bad actors with write access to the source JavaScript files. This requires root access on *nix systems and is not considered to be a vulnerability by the Electron developers.{{cite web |last=Gallagher |first=Sean |date=2019-08-07 |title=Skype, Slack, other Electron based apps can be easily backdoored |url=https://arstechnica.com/information-technology/2019/08/skype-slack-other-electron-based-apps-can-be-easily-backdoored/ |url-status=live |archive-url=https://web.archive.org/web/20190807173425/https://arstechnica.com/information-technology/2019/08/skype-slack-other-electron-based-apps-can-be-easily-backdoored/ |archive-date=7 August 2019 |accessdate=2022-08-26 |publisher=Ars Technica}} Those who are concerned that Electron is not always based on the newest version of Chromium have recommended progressive web applications as an alternative.{{cite web |last=Hoffman |first=Chris |date=2019-08-15 |title=That native app is probably just an old web browser |url=https://www.howtogeek.com/436841/that-native-app-is-probably-just-an-old-web-browser/ |url-status=live |archive-url=https://web.archive.org/web/20190815143207/https://www.howtogeek.com/436841/that-native-app-is-probably-just-an-old-web-browser/ |archive-date=15 August 2019 |accessdate=2022-08-26 |publisher=How To Geek}}
See also
{{Portal|Free and open-source software}}
{{columns-list|colwidth=35em|
- Apache Cordova
- Chromium Embedded Framework (CEF)
- HTML Application
- Qt WebEngine
- XULRunner
- JavaFX WebView
- DotNetBrowser
- Progressive web app
- Node.js
- Tauri (software framework)
- Flutter (software)
- PyQt
}}
References
{{Reflist|1}}