News for hackers. Stuff that matters.
Re:Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark... by ognarb on Tuesday December 19, 2023 @08:39AM (#38695361)
Not OP, but QML is not a great language to put more logic than simple bindings and functions like

    Button {
        text: "Save"
        enabled: textField.text.length > 0 // this is reactive to the value of a TextField
        onClicked: Backend.save()
    }
as soon as you try to for example implement the save method in JS/QML this starts to become very painful as it often ends up with a lot of spaghetti code. The very cool thing with QML is that the save function can be simply implemented in C++ like this.

    Backend::save()
    {
        // call QFile/QNetworkRequest/...
    }
It force the programmer to split their logic from the UI layer which I don't consider a bad thing.
Re:Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark... by JanisErdmanis on Tuesday December 19, 2023 @08:53AM (#38695515)
It is also possible to have a backend implemented in JS in similar way. Though I personally only have used in intial UI prototype which I latter swapped with Julia backend.
Re:Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark... by notyoutube on Tuesday December 19, 2023 @09:13AM (#38695697)
I'm curious about julia as a gui language: mind sharing your code/project?
Re:Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark... by JanisErdmanis on Tuesday December 19, 2023 @09:29AM (#38695904)
I have developed/prototyped a voting client with QML/Julia in PeaceFounderClient [1]. Few weeks ago I made bundling setup for it and have published bundles [2]. This may not scale well but I opted for bridging the backend with frontend in top scope with Bridge.qml [3] which on the Julia side is loaded with ‘loadqml’ using ‘QML.jl’ pacakge [4].

[1]: https://github.com/PeaceFounder/PeaceFounderClient/tree/main

[2]: https://github.com/PeaceFounder/PeaceFounderClient/releases

[3]: https://github.com/PeaceFounder/PeaceFounderClient/blob/main...

[4]: https://github.com/PeaceFounder/PeaceFounderClient/blob/cf9d...

Re:Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark... by notyoutube on Tuesday December 19, 2023 @09:47AM (#38696148)
And an interesting project to boot! Thanks for sharing
Re:Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark... by sircastor on Tuesday December 19, 2023 @04:15PM (#38701692)
It was basically this - and to be clear this is not a shortcoming of QML. As you said, splitting the logic layer from the UI is a good idea - but the choice for us to be building apps in QML without a logic layer under it required a lot of weird solutions that could've been easily addressed if we'd been doing C++ and Qt. But our team were Javascript developers, the team we were partnering with were Qt devs, and someone had negotiated this solution and we did the work.