TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to build a desktop app in 2022

50 点作者 picture_view大约 3 年前
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.<p>I’ve been using Electron because I know JS well and can leverage D3.<p>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&#x2F;TS&#x2F;Electron ecosystem issue that takes me a few hours to debug (if I don’t just give up first.)<p>What are some good modern tools&#x2F;frameworks for building native Desktop apps? Bonus points for cross-platform support.

22 条评论

lazypenguin大约 3 年前
The road is filled with dissatisfaction. I love desktop apps and developing at that layer but it’s clear that the segment has stagnated over the years.<p>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.<p>QML - Not much experience, didn’t attract me since less advanced widgets available.<p>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&#x2F;redo, etc.). Low level, no docs (examples + reference docs), hard to style. C++ but has bindings in tons of languages.<p>WPF - decently powerful. Kind of stagnated and windows only. Can still produce solid UI. C#<p>Alternatives: Godot, Webview2, GTK, fltk
mhoad大约 3 年前
Flutter is the most obvious answer here to me.<p>Very modern, cross platform (windows, mac, linux, fuchsia, iOS, android, web and embedded devices), excellent tooling &#x2F; 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.<p>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 <a href="https:&#x2F;&#x2F;github.com&#x2F;canonical&#x2F;ubuntu-desktop-installer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;canonical&#x2F;ubuntu-desktop-installer</a>)<p>Should be simple to pick up if you have a JS or even better good TS experience.<p><a href="https:&#x2F;&#x2F;flutter.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;flutter.dev&#x2F;</a> also here is a good charting library to get you started <a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;charts" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;charts</a>
评论 #31302462 未加载
karmakaze大约 3 年前
If I was going to try using something new it would be Flutter&#x2F;Dart.<p>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.
评论 #31302396 未加载
tough大约 3 年前
Tauri is the new Electron.<p>Look at Tamagui if you want react native (via expo) + web (nextjs) it&#x27;s still on beta but looks promising<p>The thread yesterday was pretty quiet IMHO<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31287939" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31287939</a>
rramadass大约 3 年前
C++ and Qt; all in one : <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Qt_(software)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Qt_(software)</a>
0x20cowboy大约 3 年前
If you want to keep with the browser based rendering, I&#x27;ve used this for a couple side &#x2F; internal projects: <a href="https:&#x2F;&#x2F;github.com&#x2F;webview&#x2F;webview" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;webview&#x2F;webview</a><p>Works quite well for normal things, but 3d webgl stuff can go a bit haywire.
curious-robin大约 3 年前
Recent evaluation (not mine) can be found here: <a href="https:&#x2F;&#x2F;github.com&#x2F;benjamin-thomas&#x2F;wails-elm-template#note-on-performancealternatives" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;benjamin-thomas&#x2F;wails-elm-template#note-o...</a><p>This user ends up with Wails + Elm. Some further discussion on his choice here: <a href="https:&#x2F;&#x2F;discourse.elm-lang.org&#x2F;t&#x2F;fancy-some-gui-programming-with-elm&#x2F;8330&#x2F;16" rel="nofollow">https:&#x2F;&#x2F;discourse.elm-lang.org&#x2F;t&#x2F;fancy-some-gui-programming-...</a><p>If your visualization needs are covered by <a href="https:&#x2F;&#x2F;elm-charts.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;elm-charts.org&#x2F;</a> then this might be a fitting combo for you.
shams93大约 3 年前
Take a look at qt
评论 #31299293 未加载
solomatov大约 3 年前
Electron is much better in my experience than most other cross platform toolkits. It gets better with troubleshooting as you use it more.
评论 #31299798 未加载
评论 #31299980 未加载
评论 #31300994 未加载
mikewarot大约 3 年前
Lazarus is a cross platform and open source GUI builder based on Free Pascal. If you can handle begin and end instead of { }, you&#x27;ll get used to it fairly quickly. As a bonus, it does strings that you never have to allocate or deallocate, and can handle a gigabyte of data.<p>I&#x27;ve run Lazarus on a Raspberry Pi Zero W (the old one), Linux, and Windows.
评论 #31301395 未加载
epirogov大约 3 年前
I wrote my desktop app in this winter with WinUI 3 Project Reunion in hope it will be available on linux soon. Currently this supperior project with large list on anccestors WPF, UWP and Xamarin can be compiled to Windows, MacOs and Android without any code and layout changes.
pjmlp大约 3 年前
I would go for whatever is native on each platform (on Windows, WPF is still the best way, ignore anything WinRT&#x2F;UWP related), as what bonus points are concerned, Qt would be my answer.<p>If staying with Web stack is relevant, then PWAs.
ihndan大约 3 年前
Tauri if you are already with Rust.<p>Here are some open source app built with Tauri<p><a href="https:&#x2F;&#x2F;github.com&#x2F;tauri-apps&#x2F;awesome-tauri" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tauri-apps&#x2F;awesome-tauri</a>
cpach大约 3 年前
Do you want to support all of Windows, Linux and macOS? If so, maybe QT? If not, you have some other options. E.g. macOS has it’s own proprietary libraries you can target.
riidom大约 3 年前
Godot <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24043427" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24043427</a>
farseer大约 3 年前
If you are using electron for cross-platform, consider that you are already on the right track from the available options. Everything else is much worse.
benibela大约 3 年前
I use Lazarus<p>But it is not modern. It is like Delphi was 20 years ago
viraptor大约 3 年前
If you&#x27;re ok with electron&#x27;s size, then you could look at dotnet + avaloniaui. WPF-like and very portable, desktop and mobile. <a href="http:&#x2F;&#x2F;avaloniaui.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;avaloniaui.net&#x2F;</a><p>I&#x27;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.
mikewarot大约 3 年前
What <i>kind</i> of visualization are you talking about? Charts, ray tracing, video?
adamcrow64大约 3 年前
Flutter. It gets the job done.
Shadonototra大约 3 年前
ImGui<p><a href="https:&#x2F;&#x2F;github.com&#x2F;epezent&#x2F;implot" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;epezent&#x2F;implot</a>
Shadonototra大约 3 年前
no wonder desktop apps sucks, look at the suggestion people are making in the replies... i am concerned, ashamed, and very sad