Developing a Desktop App? Here�s Why You Should Opt for Electron

July 10, 2019

Electron is a dream come true for web developers. It is a revolution that makes things easier for them. We all know that the interface is one of the crucial elements in software, and these days, there are several options to create different kinds of interfaces. But it had always catered to web applications and installed programs. Desktop apps were relegated to the background, but not anymore. They have risen from the ashes and are making a strong comeback, thanks to frameworks like Electron.

Electron is an open-source framework that helps you build amazing desktop apps with web technologies like CSS, HTML, and Javascript. If you think that it is only mobile apps that you can build on hybrid platforms, then you are wrong, because the latest developments with Electron seems to say otherwise.

A Short History Lesson

Open source developers, startups and even multinational firms now use the framework because of a number of advantages they enjoy. First, a tiny history lesson.

  • Electron started as Atom Shell on 11th April 2013. Atom is Github's hackable text editor.
  • Both Atom and Atom Shell was made open source and has an MIT license.
  • Atom changed to Electron on 17th April 2015.
  • Version 1.0 of Electron released on 11th May 2016.
  • Developers started submitting packaged apps to the Apple Store on 20th May 2016.
  • Windows Store Support was added on 2nd August 2016.

Mobile apps built on hybrid platforms created a lot of buzz when they first evolved. The functional capacity of the apps brought in a lot of revenue to the companies involved. Similarlywith Electron you can build cross-platform desktop apps to work on Windows, Mac, Linux. You can create cross-platform apps with Xamarin, Sencha, Titanium, and PhoneGap, and in a similar way, Electron gives you an all-encompassing environment with unique features and functionalities.

Let's look at some of the ways Electron simplifies hard tasks in app development.

No Need to Learn New Languages

One of the benefits of Electron is that the developers don't have to learn new languages, so that is a great time saver. They can reuse their knowledge, skill and experience, so you don't have to hire different developers to work on different operating systems. This reduces the time and cost involved in app development.

Automatic Updates

With the module, AutoUpdater, the framework helps you launch a multi-platform release server with the help of the following:

Nuts: A release server that uses GitHub as a backend. This lets you auto-update using Squirrel (Mac & Windows)

Electron-release-server: A fully featured, all-encompassing, self-hosted server for Electron applications. It works well with auto-updater.

Squirrel-updates-server: A simple node.js server. It utilizes GitHub releases for Squirrel (Mac and Windows)

Can Work on Different Browsers

Electron applications work on different browsers like Internet Explorer, Edge, Safari, Firefox, Chrome, making it easier for the users. Similarly, it doesn't matter what the operating system is, the framework can function in all.

Native Menus and Notifications

The Menu class comes with the following static methods:

Menu.setApplicationMenu(menu) - With this, you can set menu as the application menuMenu.getApplicationMenu() - This command lets you to return menuMenu.sendActionToFirstResponder(action) - This method lets you send the action to the first responder of application Menu.buildFromTemplate(template) - This command lets you return the menu with reference to template properties.
Components of Electron

The main components include Chromium, Node.js and VB Javascript Engine. Chromium, started by Google, is an open source web browser project that provides the source code for proprietary Google Chrome browser. VB is an open source Javascript engine developed by Chromium project, written in C++ and Javascript for Google Chrome web browser.

App Crash Reporting

You can submit crash reports to a remote server using this API. It would be saved in the concerned folder, and you can change the location by calling the API. This makes it easier for you to knob and report crashes.

Windows Installers

This option comes as electron-winstaller in Electron. This helps you generate Windows installer and effortlessly install your app into any machine. However, the server-side setup in Windows is not the same as MacOS, so you need to follow the instructions.

A Few Examples of Excellent Desktop Apps that Companies Use Till DateWebTorrent Desktop

Torrent is no longer the outdated medium for downloads, thanks to Electron. This framework has allowed a major comeback of the Torrent downloads and also lets you connect to BitTorrent and WebTorrent networks. The app is written in Javascript and lies on WebRTC for peer-to-peer transport.

Wordpress Desktop

This is a fast emerging desktop app, is locally hosted, with minimal load times. The app uses the framework for a seamless cross-platform experience. You can focus on content and make changes to the design without the disturbance of browser tabs.

Pexels Desktop

Pexels is an app used by writers, designers, and social media managers. It contains thousands of royalty free stock images that you can use to supplement your posts. Pexels Desktop with Electron lets users easily post any stock photo image, and use it on infographics or social media posts.

Whatsapp Desktop

This is an app that probably doesn't need an introduction of any sort. You are probably using it this very moment. It is the most downloaded messenger app, and Electron made it possible.

Conclusion

Electron lets you build desktop apps just like you would build for the browserswser. If you want to build desktop apps without going through the hassle of building and training a new team of developers, this would be the ideal choice.