The Overuse of Browser Engines in Desktop Applications

Many applications now use browser engines such as Chromium (Standard, WebView2, and Electron) instead of actually being truly native. This typically causes excessive resource usage and bloat as they’re basically packing a web browser with their application. Now this can be more convenient for developers, but causes issues later on.

Older applications were a lot smaller, and they did look worse. However, they were lightweight, fast, and most importantly: good at what they were supposed to be doing. Browser engines such as Chromium (Standard, WebView2, and Electron), and do have their place; Web-based applications shouldn’t be the default.

Developers tend to create web-based applications because many reasons, including: their cross-platform compatibility, faster development, larger community, and cloud integration. However, there are downsides to web-based applications, including: high resource usage, battery drain, slower performance, and poor operating system integration.

In terms of alternatives to these browser-based frameworks, there are many options. If you want a truly native approach, you could use some of the following:

ApproachOptions
Truly nativeFor C#, there are things such as WinUI, WPF, WinForms for Windows.
There is AppKit (Swift) specifically for Apple.
For C/C++, and Rust, there is GTK, Qt, or if you really want lightweight: FLTK.
Lightweight GUIQt, GTK, Avalonia (C#) and FLTK all support cross-platform, and are lightweight.
Middle groundTauri, this uses web technology while staying lightweight.
Tauri instead uses the WebView that comes shipped with the host system.
They guarantee an up-to-date version of Chromium to use.

Electron combines Chromium, Node.JS and native elements into one framework. As mentioned above, this may cause performance issues due to excessive resource usage. There are some pros and cons of using this, which will be mentioned below.

ProsCons
Easier for developers that aren’t as experienced with desktop application
Cross-platform
Can support framework such as React
Supports a Node.JS backend
Developers tend to be more used to JS
Excessive resource usage
Battery drain
Slower performance
Poor operating system integration

I’d consider Electron to be suitable for applications that also have a website which is the same as in the app; Things like Discord and Slack are examples of suitable uses of Electron.

Developing desktop applications with Electron vs alternatives

Electron is usually people’s first choice as it’s easy to get set up, use, and develop with.

Tauri vs Electron

There is quite a big barrier when it comes to Tauri because of what backend language it uses. Rust is currently the only option for a backend, though apparently there are plans on adding more options.

You can use React as a frontend with Tauri as it does use the default WebView. You could also use things such as Blazor (C#).

Loading


Discover more from WTDawson

Subscribe to get the latest posts sent to your email.

Leave a Reply