Ask HN: How to build a desktop app in 2022
I have a personal project I’ve been working on that is a desktop app with a UI that has some fairly complex data visualizations.
I’ve been using Electron because I know JS well and can leverage D3.
The problem I’m facing is that I sometimes go for months without working on it, and it feels like everyone I start up I’m running into some dumb JS/TS/Electron ecosystem issue that takes me a few hours to debug (if I don’t just give up first.)
What are some good modern tools/frameworks for building native Desktop apps? Bonus points for cross-platform support.
37 comments
[ 3.5 ms ] story [ 90.8 ms ] threadhttps://github.com/epezent/implot
Look at Tamagui if you want react native (via expo) + web (nextjs) it's still on beta but looks promising
The thread yesterday was pretty quiet IMHO
https://news.ycombinator.com/item?id=31287939
But it is not modern. It is like Delphi was 20 years ago
If I was going to use something (old) that might be Qt, or something that I know from way back straight up Java Swing. For something big a framework like Eclipse RCP. Should be able to use Kotlin for these now at least.
As far as I know, all react native gtk are abandonned so I would not be so sure about that, flutter does better in this area
Why is that? Flutter is best suited towards owning your own UI and design language, and not relying on Android, iOS, Windows, macOS etc specific designs, like many companies these days (Spotify, Slack).
There's some good comments on https://news.ycombinator.com/item?id=31344863
QtWidgets - decent experience, lots of functionality out of the box. Rapid iteration is lackluster compared to web dev. Great docs. Less obvious “best practices”. Works well from C++ and Python. Distribution is annoying.
QML - Not much experience, didn’t attract me since less advanced widgets available.
Dear imgui- very fun to program using this lib. Can get decent visuals and functionality. Breath of fresh air to remove a layer of complexity. Start to miss some QoL features (animations, undo/redo, etc.). Low level, no docs (examples + reference docs), hard to style. C++ but has bindings in tons of languages.
WPF - decently powerful. Kind of stagnated and windows only. Can still produce solid UI. C#
Alternatives: Godot, Webview2, GTK, fltk
I've run Lazarus on a Raspberry Pi Zero W (the old one), Linux, and Windows.
Works quite well for normal things, but 3d webgl stuff can go a bit haywire.
This user ends up with Wails + Elm. Some further discussion on his choice here: https://discourse.elm-lang.org/t/fancy-some-gui-programming-...
If your visualization needs are covered by https://elm-charts.org/ then this might be a fitting combo for you.
Very modern, cross platform (windows, mac, linux, fuchsia, iOS, android, web and embedded devices), excellent tooling / developer experience, outputs to native compiled code, battle tested in a lot of real world scenarios against billions of dollars in revenue like Google’s Ads apps for example.
On desktop specifically, Ubuntu last year or two said they were going all in on providing first class Flutter support on Linux and would be using it as their new default for their own desktop apps starting with the installer in the recently released Ubuntu 22.04 (repo link here https://github.com/canonical/ubuntu-desktop-installer)
Should be simple to pick up if you have a JS or even better good TS experience.
https://flutter.dev/ also here is a good charting library to get you started https://github.com/google/charts
I’ve seen hints of the medium term plan however which is AFAIK move from optimised JS to WASM, bring in WebGPU support, use faster canvas based rendering (rather than DOM although both are supported) and rewrite the rendering engine which is currently happening here https://github.com/flutter/engine/tree/main/impeller
I don’t suspect those problems will remain on web for very long, that looks like a very credible path to push out great native level performance on web as well to me.
If staying with Web stack is relevant, then PWAs.
I'm mentioning the size because dotnet itself will take some space unless some other app already installed it. Or you can try native compilation with it.
Here are some open source app built with Tauri
https://github.com/tauri-apps/awesome-tauri