by latentsea · 1y ago · 0 comments
To be fair, there is no practical way to write native desktop applications using stylistically consistent UI elements AND have it be portable AND in a language that you enjoy using.
As far as I can tell, Windows 11 doesn't even have a toolkit with platform UI elements.
GTK on Gnome is pretty okay and GTK-rs is not dissimilar to React. Who know what MacOS uses but something something Swift XCode.
But I agree, just use web technologies. Write once, ship everywhere (and hum loudly when people complain about poor performance - joking, it's the vendors' fault we have to use web technologies).
For Windows you're dealing with Edge (so Chromium), on macOS you have Safari, and on Linux you have WebKitGTK. WebKitGTK has honestly abysmal performance, and you're missing a lot of modern standards.
The Tauri devs are looking at bundling a Chromium browser with it to deal with that, but that's still some time off, and leads to the same issue Electron has, where you have large bloated applications.
They do, it's called WinUI 3. It's barely used for all of the aforementioned.
I don't know much about it but it seems like a weird combination. If you want high performance and low memory usage, you don't want HTML, if you want fast code writing, you don't want Rust.
Blender: frontend Python, backend C++.
Houdini: frontend Python(PyQt), backend C(presumably)
Sim City: frontend JavaScript, backend C++
The reason is very simple: frontend is more error tolerant, but less resistant to the product designer's whims (or the users' desire to customize.)
blender's frontend is pretty much exclusively C++? https://github.com/blender/blender/tree/main/source/blender/...
> Houdini: frontend Python(PyQt),
I would be infinitely surprised if Houdini's frontend wasn't also a majority C++. Likewise consider large apps such as Ardour, Krita, etc.
And furthermore, if you want fast code writing, you write in the language you already know. For some people, that is Rust.
- HTML is the main way of designing interfaces (whether we like it or not)
- Rust is the main language promoted by intelligence agencies with multi-billion dollar budgets because it is laced with their backdoors (whether we like it or not)
Qt also seems to be a good option, though there are licensing considerations for commercial applications.
I’m excited for various upcoming Rust options as well, but right now Electron is the battle tested option.
I am curious though about Avalonia. I’ve heard good things, but it’s definitely a smaller player compared to Electron. I’d most likely choose it over Microsoft’s first party frameworks.
It's also the option which gives your users by far the worst experience. Not worth it at all, imo.
Plenty of category leading applications like Discord, VSCode, Slack, Figma, etc. use it quite successfully.
I think Qt really is 'just' missing more language bindings, and a better hot reload story for more people to use it. Lots of devs (specially Free Software devs) would prefer to use native toolkits, if the prototyping experience was similar to how Vite is for web frontend stuff, I think Qt would be used a lot more.
> Qt also seems to be a good option, though there are licensing considerations for commercial applications.
you need to respect the LGPL with Qt. You also need to with Electron which uses Chromium which is LGPL.
You are right that WinForms and MVC have been around forever. However, Microsoft has continuously told devs that they are the past. So, you would be forgiven for expecting them to go away.
WinUI is the current official desktop paradigm and it is basically UWP from an API point of view. So the idea that UWP went away is not 100% accurate either.
Microsoft does not really abandon their UI tech like people say they do. But look how many different frameworks they have.
All of the above is Windows desktop only. There are a completely different set of UI technologies for the web.
UNO Platform (Open Source) allows you to use the WinUI API to target almost anything.
.NET MAUI is the official "cross platform" UI tech from Microsoft. It is what you use to target iOS and Android. As a bonus, you can target macOS and Windows too. On Windows, it uses WinUI. You will notice that the Linux desktop is missing from that list.
Here comes Avalonia to build MAUI on top of the Avalonia framework. This adds Linux and WASM to the list of platforms that MAUI will run on. Adding Linux is awesome. A lot of people have wanted that and it really completes the MAUI cross-platform story.
Adding WASM is neat but MAUI was never meant to target the web. If you use it for that, it is literally just the modern version of Silverlight. But Microsoft did not design it for that at all. It is just a back-end that Avalonia supports.
Not exactly the word I'd use, since it really hasn't changed since VB4, but it's definitely reliable and stable.