Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


OverviewFelgo Plugins Support › Is there any plugin that uses WAMP protocol ?

Tagged: , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #16067


    Hello All,

    we want to use WAMP protocol to my server client applications. I have found Autobahn-js which implements The Web Application Messaging Protocol (WAMP) .
    we would like to use QML for designing the frontend (thin client) and target Android, IOS, Windows Mobile and desktop platforms. Since Autobahn-js written in Javascript, I thought it would work. but unfortunately it didn’t.

    Here is what I did :

    1. I have downloaded the Autobahn Js library from Github.
    2. I have included all the files in my QML project.
    3. import “lib/autobahn.js” as AutoBhan
    4. Then comes the error qrc:/lib/autobahn.js:15: ReferenceError: require is not defined

    upon googling i came to know that “The require() function is a core function of node.js which is part of the engine. It’s not something language-specific just like the window object in browser-based Javascript is not something in the Javascript language. node.js actually is: a server-side JavaScript engine, which executes JavaScript files**. It is not a framework which you could load into another engine like QT**”. source.

    Here is my question:

    1. How can I make Autobahn Js library avaiable in qml ? which is actually making node.js functions running in qml.
    2. Tough there is C++ implementation, I am not convinced in using the C++ wrapper in qml because it depends on third parties like Boost.
    3. Is is possible to make JS library which depends on node.js functions in QML ? Please let me know. Thanks

      P.S: I have also posted on qt forum. I  believe here there are some qml experts. We may use V-play plugins if it supports qml. Thanks


    Felgo Team

    Hi Vishnu,

    your findings you explain in the above post are correct! I believe wrapping Autobahn Js in C++ components that you then use in QML is the best possible solution.
    You can also have a look how this is doable by yourself to see if there are better solutions than the above one that depends on Boost.

    Another option I can think of is to use Qt WebEngine to load a webpage that is able to run node.JS in the browser to execute Autobahn Js. But this solution seems not really elegant, complex to use and error-prone due to involvement of many technologies and components.

    The Qt Forum is definitely a good place to ask for more information and developer experience on this.

    Let us know how it plays out! 😉



Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded