Blog
Coming Soon...
- Web Applications are Distributed Systems in Disguise
- ws-wrapper is a lightweight WebSockets API
Just Use Web Technologies for Your Next Killer App 2025-01-26
Web-based user interfaces are simply better… in almost every way that matters
Web-based user interfaces are the future for most applications with a user interface. Full stop. There are perhaps a few noteworthy exceptions like video games or 3D modeling software, but almost every user-interface application should probably use a web-based UI technology stack.
Wait what?
Big projects like Qt, GTK, Flutter, wxWidgets, JavaFX, WinForms, WPF, MAUI, Kotlin, Fyne, AppKit… it's time to start forgetting that they exist. Like it or not, the future of UI software development is HTML and CSS (and JavaScript, for now). It doesn't matter how cross-platform these libraries become, they simply will never provide all of the benefits of a web-based application. In fact, web-based user interfaces are simply better than all of these libraries in almost every way that matters: readability, writeability, reliability, maintainability, reusability, scalability, security, testability, compatibility, learning curve, community support, and cost.
Advantages of Web Applications
- They run on web browsers, which means they can run on nearly any modern device with a screen. Yes, even embedded systems.
- Many software libraries exist to make your web application behave more like a native application. More on this later…
- They look exactly the same on nearly every device and can easily compensate for a variety of screen sizes.
- They are decoupled from the "backend" application code, allowing each side of the application to be developed independently. This also encourages a cleaner API-driven architecture.
- Myraid UI libraries (i.e. React), UI components, and tools (i.e. bundlers, linters, hot reload, CI/CD, etc.) exist for web development.
- Most software developers are already familiar with web technologies.
- The UI is declarative, and web browsers are amazingly optimized at drawing what you have requested in your HTML and CSS.
- You can mix and match UI libraries, CSS frameworks, and tools as needed, allowing your application to adopt more modern technology over time.
- As WebAssembly evolves, more tools will be created in other programming languages (if JavaScript isn't your thing).
Disadvantages of Web Applications
- They typically use a lot more RAM
- Binary sizes are typically larger
- They might not have the native look & feel of the operating system
- If graphics (i.e. high GPU performance) really matter, web applications are much riskier. This will change as more applications leverage WebGL.
- EDIT 2025-02-02: Decoupling the "backend" application code from the "frontend" web interface requires communication (i.e. WebSockets) and a data encoding layer.
So if you have a few hundred megabytes of RAM and can sacrifice a small bit of performance, I'd argue that a web application is the way to go. RAM and disk space is cheap.
Case Study: Visual Studio Code
Visual Studio Code is an Electron application, written using HTML, CSS, and JavaScript. It's visually stunning, remarkably fast, and enormous.
Just look at it!
So did this Microsoft team choose a winning technology stack? This application will run on almost anything, and it has become one of the most widely used IDEs on the planet1. Look, it even runs in your web browser: https://vscode.dev/
Picking a Web UI Framework
Software developers have already discovered why web-based user interfaces are so amazing, and so many frameworks exist to present the UI and allow it to communicate with the "backend" software.
Here are a few popular frameworks:
- Electron – probably the most popular and widely adopted
- Tauri
- WebUI – I am using this for a project. I'd recommend reading this blog post.
- Gluon
- NW.js
- Neutralinojs
Here's a nice table comparing a few of them. Some frameworks support more native look & feel than others. Some support multiple programming languages and some do not. Some produce larger binaries, others are much smaller. Some support Android, iOS, and ARM, some don't. You get the point. My advice is to weigh these trade-offs against your application's requirements and follow the KISS principle.
The End
GUI libraries come and go, but web UIs will be around for a very, very long time. Considering an application as pervasive as VSCode can run with Electron under the hood, why not give it a try?
Blog Post Index
- 2025-01-26 Just Use Web Technologies for Your Next Killer App
- 2024-12-14 Typora – A Brief Review of the Best Markdown Editor
- 2024-11-06 nushell – A Shell Using Structured Data
- 2024-10-07 Building a Markdown Blog with Caddy
- 2024-10-06 Surround Sound on a Raspberry Pi 3
- 2024-10-03 Building a Markdown Website with Caddy
- 2024-09-25 My Git Configuration
- 2024-09-11 Why Databases
- 2024-09-06 New Website
-
Disclaimer: I prefer Sublime Text instead. 😄 ↩︎