May 13, 2025
Trending News

Electron, a cross-platform application framework that divides users and developers

  • October 13, 2023
  • 0

I will take this opportunity to explain a little Electrona technology that in its history has caused controversy and, above all, bitter debates between developers and users, and

I will take this opportunity to explain a little Electrona technology that in its history has caused controversy and, above all, bitter debates between developers and users, and which, although it has its merits, comes at the price of paying a price that is too high for some.

What is Electron?

Basically Electron is a frame or framework which allows you to build applications using technologies widely used on the web. As a result, and greatly simplified, Electron apps are standalone websites that try to pass themselves off as native apps as much as possible and support OS features like their notifications or the macOS menu bar, to name two obvious examples.

The first application to give it a boost was Atom, a code editor that was long since discontinued due to Visual Studio code enforcement. Another factor to consider here is that both Electron and Atom were creations of GitHub, a company owned by Microsoft for years, although it’s no less true that Atom’s use and impact has been limited over the long term. before its interruption.

After having Atom as his first spear and calling himself Atom Shell for the first time, Electron was revealed as a very interesting framework for the development of cross-platform applications, which, along with the widespread use of web technologies among developers, allowed it to reach a high level of popularity and be an important piece for companies like Microsoft. Today, the aforementioned Visual Studio Code and the official applications Slack, Twitch, Skype, Microsoft Teams, Discord, Signal and Postman are based on Electron. There is nothing here.

Electron logo

Electron logo.

He framework In 2019, it changed hands, moving from GitHub to the OpenJS Foundation, one of the many organizations under the umbrella of The Linux Foundation. Although many times the transfer of a project to a foundation is due to the fact that the responsible company has ceased to be interested in the product, on this occasion it can be said that it served to make it independent, since its use is still widespread.

A final general point to keep in mind is the electron It is open source under the MIT license, which enables the creation of proprietary derivatives. This explains the good reception it has among companies that are not obliged to redistribute the source code of derivative products.

Some basic parts

The most basic parts of Electron are Chromewhich takes care of the frontend (what is displayed to the user), and Node.js, a server environment that provides a backend (the part of the application that the user doesn’t see but that runs) supported by JavaScript and the language’s own V8 Chromium engine. Here we already have a clear focus on creating applications based on web technologies.

On more than one occasion, I’ve shown Chromium as a technology foundation, rather than just a web browser. Electron is the biggest exponent of this perspective, and is one of the reasons why Chromium is so popular and so much development is based on it today.

Because Electronic applications are essentially Web applications, HTML, CSS and JavaScript are used for its construction or at least its deployment. Yes, there’s nothing here that isn’t familiar to anyone even remotely serious about web development, and the large number of developers with this knowledge that it exists is a huge boon to framework.

To develop an application with Electron it is necessary to install Node.js and check that the npm commands work, we recommend the LTS version of the server because of the more stability it provides against changes introduced through different versions. Other required tools are a code editor, a command line interface (CLI), and Git and GitHub version managers are recommended, although the last component sounds more like a legacy than a requirement that is sustainable from a perspective. from a technical point of view.

Visual Studio Code, one of the most popular Electron-based applications.

Another interesting detail for developers is that framework “offers a blank slate with no opinions on how to build your app. Choose to integrate your favorite libraries and frameworks from the frontend ecosystem or create your own path using your own HTML code.” This means a developer can use React, Angular, Vue.js, TypeScript and more.

Just because it allows creating applications for desktop operating systems using web technologies does not mean that Electron is (at least partially) built with them. We are currently taking its official GitHub repository as a reference It is built 57.2% with C++, 30.7% with TypeScript, 6.4% with Objective-C++, 2.8% with JavaScript, and 1.9% with Python. As we can see, most of the framework is built using C++, a technology that is compiled into binary format in its official version.

To smooth out the learning curve, those responsible for framework They recommend installing Electron Fiddlean application that runs in isolation, is self-maintaining, and that serves “as a learning tool for experimenting with Electron APIs or for prototyping features during development.”

Electron officially supports Windows, Linux, and macOS, but that doesn’t mean that all applications based on it must support all three operating systems. In fact, it’s quite normal for Linux to be left out, as seen on the official Twitch app.

Advantages of using Electron

The main strength of Electron and the advantage it offers when building applications with it is that It makes cross-platform support between Windows, macOS and Linux much easierso its use can be ideal for those situations where cross-platform support is a top priority and the goal is to offer a consistent experience across all supported operating systems.

Electron’s popularity began to rise at a time when the use of cross-platform technologies began to increase with macOS (formerly OS X) starting to have many users and the Linux desktop starting to gain some influence through Ubuntu. Developing from scratch for each operating system was already difficult to achieve, which is why technologies like Qt (KDE’s technology base), Python, and Electron gained popularity to more easily cover multiple operating systems.

Another advantage of Electron is that it relies on well-known technologies when developing applications. This, along with the fact that developers tend to stick with what they know, made it possible framework gain a lot of popularity due to the large number of programmers who have knowledge of JavaScript, HTML and CSS.

Disadvantages of using Electron

Electron makes it very easy to develop cross-platform applications with very common technologies, but as I said before, the consequence of this is that we are essentially talking about separate websites, so in the end Simply put, the user launches a web browser for each Electron application..

Web browsers are already heavy applications, at least if we stick to the most popular options on the market, and this directly affects applications built with Electron. The implication is that while an application built with this framework isn’t necessarily very heavy, it doesn’t take much running to see examples that consume more than 150 megabytes, so developers should take care to optimize the code they write.

Finally, Electronic applications are not particularly effectivewho did framework it has earned a legion of detractors, especially in the Linux and free software communities, for whom optimization is generally a very important point.

An abbreviation that may have little value

The facilities that Electron makes available are closely related to the trends emerging in software development recently. I’m not just talking about cross-platform technologies here, but also things like overuse of shortcuts, technologies that perform at a high level, and delegating optimization to hardware performance (the latter is becoming all too common in the software industry). ).

Unfortunately, It’s not hard to find apps that are basically nothing more than the same official website or a part of it served in a separate way.so it’s quite likely that in the end opening a web browser and going to the relevant page will end up offering better performance to the user’s surprise, so in the end a bookmark in Firefox, Chrome or Microsoft Edge is better than installing an app that performs worse and takes up disk space.

The appearance of many Electron applications providing no value compared to a web browser is another reason why framework He earned a legion of detractors. And I won’t deny it, if I find the same web page on its own in the application, I go straight to using the bookmark, first in Firefox and if I see that it’s not going well, I use Chromium, the secondary browser that I use just for these cases.

Microsoft, addicted to electron

It is surprising that Microsoft, the developer framework .NET is one of the companies that use Electron the most, but that’s the conclusion one comes to when learning that Skype, GitHub Desktop, Microsoft Teams, and Visual Studio Code were built with or migrated to the framework.

Of all the cases that the Redmond giant is responsible for, this is without a doubt the most remarkable Visual Studio Code, which is an example of how to add something of value using Electron. This does not mean that the application has detractors who recommend Sublime Text, which is built in C++, but the code editor from Microsoft has managed to attract many developers.

Visual Studio Code is an application that is quite well done at the interface level and has a large number of plugins available that allow you to expand its integration possibilities with other technologies or convert it into something close to an IDE. In addition, its integrated console was an aspect that allowed it to stand out from some of its competitors at the time and proved to be a very useful tool for speeding up certain tasks.

Microsoft has released the source code for all core components of Visual Studio Code under the MIT licenseso those who want to enjoy its advantages without dragging the doubts cast by the company’s policy can turn to VSCodium, perhaps the most popular fork.

Conclusion

As we can see, Electron is a technology that has a long history and has written sites of all kinds, good and bad. Although it has many detractors, all indications are that it will continue to be used in the future and that new projects using it will likely continue to appear.

As I said before, using Electron may not be bad if things are done right (Visual Studio Code is an example of this), but it’s no less true that there are those who take it as a shortcut to not using more efficient technologies and there are cases of low-quality applications that end up offering worse performance than a web browser.

Source: Muy Computer

Leave a Reply

Your email address will not be published. Required fields are marked *

Exit mobile version