Learning Electron: Build Desktop Apps using JS+HTML+CSS
Mastering electron fundamentals: ipc module, basics, menus, browserWindows and much more!
Description
Electron helps us develop cross-platform applications by using existing web technologies. You don't need specific skills, for most cases, to develop apps with Electron. If you are a web developer and are interested in developing an app with Electron, then make sure you check out tutorials that will follow this article in this series.
If you want your application to be available for all the platforms we talked about, you need to deploy your app using different technologies. This is very manual and time-consuming. Now, if we talk about Electron, it is obvious that this is a JavaScript-based framework. Because all the platforms support web technologies, Electron helps in developing cross-platform apps easier. Popular applications that use Electron include Visual Studio Code, Slack, and Atom Editor.
Electron Features
Security
You don’t need to think much when migrating your existing application to Electron as the application we are creating is a desktop application and data stays locally in the system. Because of this, you can ensure data security. In case you need to store data in the cloud, check whether your cloud network has enough security functions beforehand to avoid any unwanted surprises.
Low-Level Accessibility
Before starting out, you also have to check whether all the functionalities you are providing for your desktop application are also available in Electron. In my experience, Electron provides enough control to have the extended interactive features in your application, such as Keyboard Shortcuts. It also provides low-level accessibility to the hardware and operations system components.
Hardware Accessibility
Developers can get complete access to the all hardware level access APIs expose over the JavaScript/Plugin. There is no need to compromise for the feature if you want to migrate to Electron.
Performance
Electron thrives in this aspect. If proper care is taken while developing (load only what you need), Electron can show some great gains in the terms of performance when compared to native applications. Electron saves a lot of time and provides more options to play with or develop by having a single code base for all the major platforms. These are the major problems when we deal with the native development of applications, which are all effectively solved by Electron.
However, a lot of people say that Electron is very memory hungry. I agree with this statement, but only if you develop the applications without proper care.
Code and App Management
As a Product Owner, you don’t need to maintain different teams for each platform and you will be relieved from the hassle of re-explaining your requirements with different teams. It will also reduce the auditing work to make sure the product has the same functionality across platforms.
As a developer, you need not worry about different codebases. If you encounter a bug on any platform, you can fix it at the code base. The bug will never show up on other platforms. However, you should still keep an eye on the OS level functionalities.
Reusability
Because we are using a single code base, it means we can use this for both web applications and desktop applications. We are, in a way, also reusing the base code across different platforms since we “code once, distribute everywhere.”
Production
The more known frameworks we use, the more support we get. This, in turn, gives us more open source libraries we can reuse and the decreased time to production but with more features.
Deployment/Build
This is one of the interesting aspects of Electron. There is an electron-packager module available that helps us bundle the whole code base into the respective packages. Although people debate that Electron takes a lot of memory, as I said, Electron needs a little care during development to avoid this.
UI/UX
With web technologies, you are open to multiple technologies that provide great User Interface (UI) and User Experience (UX) to all your users with great comfort. Also, you can be sure that you are providing the same experience to all your users across different platforms.
Cost and Time
You will save a lot of development time and money because, for the tech stack we use, there are a lot of developers who can do it for less and achieve good results. You can save a lot of time using the single code base and any developer can work on anything.
History of Electron
When we talk about any technology we need to talk a little about the history behind it. Let's briefly look at the history of Electron.
Electron was founded by Cheng Zhao, during the development of Atom a cross-platform text editor released in July 2013. It was made open source, developed, and supported by GitHub using C++, JavaScript, Objective C, and Python. It was intended to make cross-platform development easier for Atom creation.
What You Will Learn!
- Build Cross Platform Desktop Applications for Mac, Windows and Linux
- Understand the near-entire Electron API in detail.
- Mastering the Basics fo Electron Framework
- Develop both traditional single-window apps and status tray-based apps
- Get an Understanding about how Electron works
- Debug Electron Application
- Testing Electron Application
Who Should Attend!
- Anyone who wants to create compelling native desktop applications