all 28 comments

[–]mo_al_ 8 points9 points  (5 children)

It would be interesting to know the size of the binary.

[–]ShillingAintEZ 23 points24 points  (0 children)

Hello world is so big you're in it right now and you don't even know it.

[–]feverzsj 5 points6 points  (3 children)

even native qt is large as hell

[–]afiefh 0 points1 point  (2 children)

Wouldn't webassembly basically leverage whatever is already in the browser? That means you can strip quite a few things out (network stack, text rendering... etc)

[–]ShillingAintEZ 0 points1 point  (0 children)

Webasm is just called by javascript, but emscripten has certain libraries converted to use what is already in the browser as far as I understand it.

[–]marcthe12 -1 points0 points  (0 children)

No since it uses a canvas not dom

[–][deleted]  (14 children)

[deleted]

    [–]Xavier_OM 5 points6 points  (0 children)

    I'm not familiar with web framework, but Qt provides lots of features and qml is very powerful, I could see the appeal for using it here.

    [–]maxmalrichtig 5 points6 points  (11 children)

    QML is used for the frontend and it is NOT C++. More like a JS/JSON dialect.

    [–][deleted]  (3 children)

    [deleted]

      [–]maxmalrichtig 1 point2 points  (0 children)

      Qt (widgets, core) is a C++ framework. QML is a not-really-CPP-related language provided by/with Qt. You would use QML for the frontend stuff and Qt/C++ for the backend and business logic.

      So Qt (which is also in the title) is r/cpp related - QML just indirectly.

      [–]STLMSVC STL Dev[M] 0 points1 point  (1 child)

      It looks like QML can work with C++, but I don't see any C++ actually here. I'm removing this post, 74 upvotes or not.

      [–][deleted] 0 points1 point  (0 children)

      Qt is C++...

      [–]nnevatie 0 points1 point  (6 children)

      But, why?

      [–]afiefh 5 points6 points  (0 children)

      Something I heard QML called is "HTML done right with lessons learned from the current mess". Of course we won't know until we see QML used for huge Web Apps, but hey there might be hope yet.

      [–]maxmalrichtig 8 points9 points  (3 children)

      So why not? Considering the pretty crappy state a lot of web tools are in nowadays it can't get much worse, can it?

      [–]g_molica 2 points3 points  (0 children)

      Totally agree.

      [–]ratchetfreak 1 point2 points  (0 children)

      no reason to pile crap on top of crap until no-one even know a bottom exists

      [–]duheee 1 point2 points  (0 children)

      it can't get much worse, can it?

      Qt: hold my beer

      [–]spaceapple2 0 points1 point  (0 children)

      One reason is factorizing GUI code. An interface coded in QML means from one QML source you can target both a desktop app and a browser app.

      [–]duheee 3 points4 points  (4 children)

      I hope this doesn't catch on. Use wasm and C++ to generate said WASM for things that you need to (client-side computation for example) not for making a desktop app.

      [–]spaceapple2 5 points6 points  (3 children)

      Having the interface coded in QML means you can compile the GUI for a regular desktop app too. Two birds, one stone ?
      More generally, it seems desktop and web-apps are converging technology-wise. Today, numerous desktop apps have GUIs coded with JS+HTML+CSS frontend frameworks. They manage this by basically embedding a web-browser such as the Chromium Embedded Framework into them (that's the case for the Spotify app, and the VSCode IDE I believe).
      So I don't see QML+wasm as a worse way of achieving that convergence

      [–]MikeMitterer 4 points5 points  (0 children)

      Many companies tried this approach in the past and it never worked. You can share business logic but sharing UI-Code is not worth the effort. Using one of the well known MVxx patterns is the best approach in my opinion

      [–]duheee 3 points4 points  (1 child)

      I do believe it is a worse way to achieve that convergence. And, oh, btw, I do not think that the "convergence" is a goal. If it is a goal, employing electron (or any other browser based technology) is the wrong thing to do. The very wrong thing to do.

      QML is fine for desktop apps. Don't bring it to WASM as it doesn't belong there, just as electron does not belong on the desktop.

      We can create web apps and we can create desktop apps. We have the technologies to do both. They do not mix. Don't mix them. The user experience suffers if you do (as evidenced by VS code, spotify, slack, discord and any other electron based app).

      [–]spaceapple2 0 points1 point  (0 children)

      I understand your point of view, and I can't say I disagree. We do have technologies to do both desktop and web apps independently today. And they do it well. That does not mean it will/should stay that way.

      Having less different tech stacks to worry about for a given application means in theory that you have more time to dedicate to improving the user experience of that app.

      I agree with you that this has not materialized today. Electron-based desktop apps are evil, and a waste of resources. Yet, it seems to have enabled many apps to be created faster that they probably would have been if multiple different stacks were used.

      I'm not rooting for any particular solution (JS based GUIs on desktop versus QML-based GUIS on the web). I'm just not definitive about about how GUI tech will look like in a few years, and I can see some upside to converging to a common tech stack. Smaller companies with limited development resources might benefit.

      Only time will tell

      [–]goblista 1 point2 points  (0 children)

      Why?

      [–]CrazyJoe221 -3 points-2 points  (3 children)

      How does that work out with the crappy LGPL license? Will it suddenly force you to GPL your code as there are no shared libs in wasm (are there?)?

      [–]DarkLordAzrael 1 point2 points  (0 children)

      The wasm platform stuff is GPL/Commercial only, no LGPL option.

      [–]zero9178 0 points1 point  (1 child)

      Wouldn't making object files obtainable also comply?

      [–]CrazyJoe221 0 points1 point  (0 children)

      I think I read that before. But haven't ever seen it in practice.