Главная Новости

Sergey Kruglov go

Опубликовано: 14.08.2022

More and more rankings indicate that JavaScript is the most popular programming language today. For many, this is not a good indicator of where the software is heading, and ElectronJS doesn't make things any better. Are we doomed to resource-intensive quasi-applications running on JavaScript frameworks? Or maybe the prospect of a reasonable alternative is visible on the horizon?

Looking for an alternative to Electron

Using JavaScript and Electron to deliver applications to the desktop (that is, outside the browser) has a distinct advantage. With relatively little effort, it is possible to provide the same application for almost all operating systems, because today Chrome can be run almost anywhere. We have already written about the disadvantages - heaviness and a huge appetite for RAM make PCs, which until a few years ago they even coped with games without problems, today cannot be compared with an application for adjusting screen brightness.

As a result, the question arises - is there or will there be a way that will retain the advantages of Electron, but in terms of resource intensity will be comparable to strictly native software? Perhaps the answer comes from the Lorca library presented at this year's FOSDEM by Sergey Zaitsev. They allow you to create multi-platform software in Golang with an interface designed in city 5.

Golang + HTML 5 + Chrome = Lorca

Lorca, of course, also uses Chrome (version 70 or higher), but instead of launching each subsequent instance for each application, it uses the one already installed and launched first. This smart play is possible with the Chrome DevTools protocol and therefore development tools. Just like they create a new instance after editing a site without starting a whole new instance of Chrome, similarly Lorca uses developer mode mechanisms to run software in Golang/HTML5.

This solution seems to have a significant advantage over Electron. First of all, we are dealing with Golang and the applications themselves should be smaller and more efficient, see Sergey Kruglov go than in case with js. Secondly, instead of cloning instances of Chrome each time, Lorca cleverly uses patents known from developer tools. Is this enough to win the hearts of programmers? This is easy to see: the Lorca libraries are now available on GitHub under the MIT license.

Опубликовано: 14.08.2022 | Исправлено: 14.08.2022



Фархад Коломийц
14.08.2022 в 18:40
- Очередная часть материалов российского расследования по катынскому делу готовится к передаче польской стороне, сообщил глава МИД России Сергей Лавров. Всего предстоит передать 35 томов и решение о прекращении расследования.

Все комментарии
Мы в соцсетях
Видеоканал
Поделиться
rss