Electron Apps Are Bad, So Now You Can Create Desktop Apps With HTML5 + Golang

Original: https://www.phoronix.com/scan.php?page=news_item&px=HTML5-Golang-Desktop-Apps

-------------------------------------------------------

We Rely On Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained for the past 15 years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium. You can also consider a tip via PayPal.Electron Apps Are Bad, So Now You Can Create Desktop Apps With HTML5 + Golang

Written by  Michael Larabel in  Desktop on 9 February 2019 at 06:52 AM EST.  47 Comments
DESKTOP --
The Electron software framework that allows creating desktop GUI application interfaces using JavaScript and relies upon a bundled Chromium+Node.js run-time is notorious among most Linux desktop users for being resource heavy, not integrating well with most desktops, and generally being despised. For those that are fond of using web standards for creating desktop GUIs, now there is a way to create desktop application front-ends using HTML5 and Golang but with less baggage.

Developer Serge Zaitsev presented at FOSDEM 2019 last weekend in Brussels about his work on the Webview and Lorca libraries. These libraries allow building modern desktop applications within the Go programming language while writing the interfaces in HTML5.

Lorca allows building cross-platform modern desktop applications with HTML5 and Golang. Lorca relies upon Chrome/Chromium for its UI layer, but doesn't bundle its own version thus allowing the system browser to be re-used. Compared to the likes of Electron, Lorca aims to be much lighter weight, supports calling arbitrary JavaScript code from within Go, and other features to put it roughly at feature parity with Electron.

Webview meanwhile is lower-level and just about presenting application user interfaces in browser-based windows. Webview also supports C and C++ in addition to Golang and also exposes bindings for other languages like Rust and Haskell. This library supports not only Chrome/Chromium but also working on Windows' MSHTML and other WebKit coverage.

Those curious about combining HTML5 with Golang for desktop apps can learn more via  this slide deck (PDF) from FOSDEM as well as the  WebM session recording.

Guess you like

Origin www.cnblogs.com/oxspirt/p/11736595.html