Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Portable Logic (body)
Forum Updated to NodeBB v4.3 + New Features

Portable Logic (body)

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • niqtN Offline
    niqtN Offline
    niqt
    wrote on last edited by
    #1

    Martin Fowler talk in this article http://martinfowler.com/articles/multiMobile/#cover of portable body (logic) (slide 23). He talk thinking a web, i instead think to Qt/Qml, where Qml is the native gui and c++/javascript is the portable body. Is exsisting a benchmark between qml/Qt vs Hybrid(web+native; javascript+native) applications? For me this is an interesting point. If someone wants to help me in this comparison, I would be happy.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DRAX
      wrote on last edited by
      #2

      Link you provided doesn't work anymore.
      Theoretically you could just copy JavaScript part and make QML elements corresponding to HTML tags.
      However, I haven't done such thing so I can't be 100% sure about it.

      1 Reply Last reply
      0
      • niqtN Offline
        niqtN Offline
        niqt
        wrote on last edited by
        #3

        I have corrected the link (sorry for the error). maybe aint clear my post, i would to demonstrate that qml/qt is better than solutions Fowler's proposal.

        1 Reply Last reply
        0
        • niqtN Offline
          niqtN Offline
          niqt
          wrote on last edited by
          #4

          a first response might be http://www.infoworld.com/t/mobile-development/and-the-winner-cross-platform-mobile-app-dev-c-208770

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chrisadams
            wrote on last edited by
            #5

            Hi,

            In pretty much every benchmark I've ever seen, the performance of native, compiled code thrashes the performance of JS code run by a browser's JS engine. The only case where it doesn't, is the "compile and run once" time (compilation time of native code dominates runtime, generally, because absolutely everything - including cold-code - is optimised, whereas modern JavaScript engines are designed to minimise compile+run-once time, in the common case). As for using CSS to do animations and UI stuff, well, yeah, again, every benchmark I've ever seen shows native code coming out on top.

            QML is a special case because it's a hybrid, itself. It allows the application logic to be entirely implemented in either C++ or JavaScript, and the application UI to be entirely implemented in QML. The visual elements in the QML-defined scene can themselves be native widgets, or user-defined controls.

            The current implementation of the QML engine does most stuff at run-time (interprets everything into intermediate bytecode format, builds metaobjects at runtime, instantiates instances of those types, assigns properties, builds binding expressions and runs them, etc) but the implementation could certainly be improved to do more stuff natively (eg, the compilation step could involve emitting binding expressions in IR form, which then get converted to C++ code by the engine, to be compiled by a C++ compiler for real-native performance of bindings).

            Apart from the fact that no standard QML web runtime plugin exists for the major browsers, I personally think that QML is the best form of hybrid solution in the world today. But I might be biased ;-) Performance-wise, it thrashes pretty much every non-native, non-compiled solution I've seen, at the very least, while still having a nice syntax and run-time extensibility.

            Cheers,
            Chris.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved