Desktop web-apps won. Simply because native UI libraries never evolved past their 90s days. Either the UI is defined in some DSL, that’s loaded (or compiled) and then you spend most of the time writing getElement(pathToElement) and wiring it up, or you have to boilerplate create each element and parent.addChild(element).

And wiring it up is also a pain. Send a signal or event, add a listener or slot, or whatever fancy name each framework comes up with, and if you have to modify another element, it means querying for it, or having a singleton, or passing a reference/pointer, or whatever. It’s so friggin-old school.

In the meanwhile, the web discovered reactivity, components, declaring the UI and having the logic in the same file, live debugging, tight development loops, and so much more.

Is it just too difficult for native frameworks? Is it a sunken cost issue or fear of breaking backwards compatibility? Why can’t native UI development be as easy and approachable as web dev?

Don’t get me wrong, I need webdev like a child needs cancer, but I’ve tried Slint, imGUi, Qt, Gtk, wxWidgets, and more and the experience makes me want to blow my brains out every single time. I dread writing any native GUI that I got desperate enough to try writing a TUI but that’s unbelievably worse!

It’s gotten so bad, that Tauri and Dioxus are now on the menu. I never wanted to mix web dev into my native applications, but it feels like the abominably anachronistic state of native UI development is just forcing not only me, but anybody who wants to have a good experience writing native UI apps (especially those that are multi-platform), to use a fucking web view! A memory-hogging web view!

  • brian@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    22 hours ago

    I wish the desktop react native renderers took off. I definitely do prefer the react style of colocating everything + reactive state, and being able to swap different renderers for actually native feel doesn’t really seem like a goal for any maintained projects anymore. on that note, you could write your tui in react with ink or opentui if you want to go that route

    dioxus does have a native renderer (in the not webview sense, it still draws it’s own components, but most of the options do). if you’re looking at rust already, iced seems pretty close to react style, and has a decent number of things written in it already. relm4 is a different style rust framework for gtk that you might like as well.

    again not native appearance, but avalonia funcui can be pretty close to the react feel too if you’re open to f#