Recently, we introduced you to the Electron framework and the 10 most popular Electron apps. As we mentioned back then Electron is an open source framework allowing developers to build cross-platform apps. And even though there are some developers that are not so keen on using it, Electron is by far the best framework to build cross-platform applications for desktop. Especially, if you know how and what to use it for. Furthermore, it is becoming stronger and better with the new updates for Electron 4 and 5.
What’s new with Electron 4?
With Electron 4, developers can disable remote module. That is the mechanism to access main process modules for BrowserWindow and webview tags. By doing that, developers have an extra level of control over application security. Furthermore, if developers don’t want to disable the remote module completely, but still want to have control over the required modules, they can use the filter function, remote.require.
In addition, Electron 4 WebContents instances include a new method, setBackgroundThrottling(allowed). That is for enabling or disabling throttling of timers and animations when a page runs in the background. Most importantly, Chromium no longer supports macOS 10.9 (OS X Mavericks). This means, that Electron 4.0 and its future updates don’t support it, as well.
What’s new with Electron 5?
The major changes
- Package app will work like default apps: Default application menus will be generated and the window-all-closed event will be automatically handled unless the app handles these features itself.
- Sandbox: true now actually sandboxes renderers as mixed-sandbox mode will be active by default. Previously this had to be manually activated.
- NodeIntegration and webviewTag are now false default values for better security.
- Asynchronous results are now to be provided by the SpellCheck API.
- Multiple BrowserViews can now be seen in the same BrowserWindow.
- In Electron 5, Promises will be returned by the callback-based functions that are called “Electron’s Promisification initiative”. Both the callback and Promise-based versions of these functions will work correctly, and will both be documented during this transition period.
- To enable access to MacOS system colours, three changes and additions to systemPreferences were executed. Namely, systemPreferences.getAccentColor, systemPreferences.getColor, and systemPreferences.getSystemColor.
- Now memory usage statistics regarding current statistics processes can be obtained thanks to the introduction of process.getProcessMemoryInfo function.
- Remote.getBuiltin, remote.getCurrentWindow, remote.getCurrentWebContents and .getWebContents can be filtered as part of the introduction of new remote events, which were added to improved security in the remote API.
Electron 5.0.0 saw the deprecation of three APIs, which are planned for removal in Electron 6: Namely, Mksnapshot binaries for arm and arm64, ServiceWorker APIs on WebContents, and Automatic modules with sandboxed webContents.
What’s next, Electron 6?
Electron 6 is due on the 30th of July and numerous improvements are already in progression as demonstrated in the Electron release summary. This states that this new version will include Chromium M76 and Node V12.0. In addition, Electron’s App Feedback Programme is allowing developers to conduct early testing and give feedback during the beta release cycle.
For the 3.0 release, Electron has given their gratitude to Atlassian, Atom, Microsoft Teams, Oculus, OpenFin, Slack, Symphony, VS Code among others for their help.
Electron is clearly working hard to keep providing developers with the best framework to build desktop applications with web technologies. Despite being snubbed by some developers, this powerful framework has much to offer. Developers do not need a particularly powerful machine and it can be used on most platforms.
It will be interesting to see where its continuous improvements and update will lead it. Here at Wiredelta, we will be sure to keep you up to date on this and other frameworks, so why not join our newsletter to make sure you never will miss out. If you have a project that would require Electron or any other framework, why not reach out to us and see what our team can do.