15 votes

Speedy Desktop Apps with GTK and Rust

3 comments

  1. [3]
    feigneddork Link
    I think this looks really cool, and there is always something inside of me that gets really excited when I hear news about desktop GUI tools. At the same time, I think it will take a lot more than...

    I think this looks really cool, and there is always something inside of me that gets really excited when I hear news about desktop GUI tools. At the same time, I think it will take a lot more than just a nice wrapper around an existing GUI framework to sell desktop GUI tools to people.

    I think that a lot of GUI devs realise that quite a lot of people don't want to develop using Electron or make web based GUIs where we have this hefty server backend/JS frontend on the user's machine to do something (e.g. GitKraken). But the problem is that desktop GUI hasn't offered anything better than the current web development.

    Here is what current web development offers:

    • Multi platform development - if I write an app for the web, I can target lots of platforms - desktop, mobile, TVs? Basically anything that can run a modern web browser can run my web app. That's powerful as hell.
    • Better tools to develop UI - with desktop, the tooling is incredibly inconsistent and trying to get semi-complicated form layouts out (like e.g. having a label header, then having an inner layout manager of three columns where on the left and middle column is a list, and on the right is buttons like "transfer", "save", "cancel" etc) can be an utter pain to solve. On the web? Use flexbox or divs. You can find this out within minutes and implement a basic idea within 15-30 mins to get a feel for the design and whether it will work out or not.
    • Compilation - The best desktop UI I've ever used was Qt - it was a lovely event driven UI thing. The one thing I absolutely hated about it was the billions of toolchains that needed to be installed just so one evening I can make a "hello world" app and forget about it again. With web apps, there's relatively little compilation, even with node and some of the ugliness that comes with it (coughs node_modules folder, package.json bizzarre versioning coughs) it takes a matter of minutes to build a new project and then to package it up into something that is servable via netlify or whatever.
    • Licensing - Qt was amazing, but unless you were developing open source software pretty much forget about it. Compare this to webapps where a lot of them are just straight-up MIT licensed projects - and I'm talking about entire frameworks.
    • Rate of innovation on the tech - with desktop tooling, you'd have to wait months if not years to see a signififcant improvement in the tooling. Compare that to web development where I feel like I can't really keep up with the rate of innovation.
    • Rapid development iteration - I can just write code in my editor, save it, and the changes immediately appear in my browser. The old "make a change, then compile, then run it" feels ancient and obsolete when you've done web development.

    Now lets look at the cons of web apps:

    • Resource intensive - native apps are incredibly optimised with their platform. Web apps at the least need a modern, bloated browser which is basically it's own OS in it's own right.
    • Slow - see resource intensive.
    • Does not feel or behave native - even if you had a lot of CSS to change the style of it, there will be things like DOM rendering that will give the game away pretty soon.

    Maybe there are more cons, but as a developer it's plainly easy to see why desktop GUIs have died... Unless pigs start flying and Microsoft, Apple, and the Linux community work together to build a cross platform framework where all the dev has to do is specify a layout of some kind and it would produce the same but native component on each platform whilst allowing app code to run on the platform natively without a VM of some kind and with tooling that allows iterative development and a relatively small toolchain that allows building and rebuilding super quickly.

    But I doubt that will happen any time soon.

    3 votes
    1. [2]
      tindall Link Parent
      You are describing libui

      Unless pigs start flying and Microsoft, Apple, and the Linux community work together to build a cross platform framework where all the dev has to do is specify a layout of some kind and it would produce the same but native component on each platform whilst allowing app code to run on the platform natively without a VM of some kind

      You are describing libui

      5 votes
      1. feigneddork Link Parent
        Even though its still in alpha, that is incredibly promising and I hope it takes off and gains traction.

        Even though its still in alpha, that is incredibly promising and I hope it takes off and gains traction.