Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 436
Registered: ‎06-22-2010
My Device: na
My Carrier: blackberry developer

Cascades Server Communication

Can i build a full fleged app that requires server communication in Cascades without using C++ and instead use JavaScript?

Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Cascades Server Communication

You'd better define "full-fledged" in detail there. Servers are not all alike, nor protocols, nor the type of things a "full-fledged" app might need to do with the data.

Also, you will, at the very least, need some C++ stub code that sets up the application and launches the QML, as you can get easily by using the standard Cascades app template(s) in Momentics. Definitely you cannot do it with *no* C++ at all, since the OS has no support for directly launching .qml files.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: Cascades Server Communication

yes you can...


Cascades is available as

1) QML

2) WebWorks (html5)

3) fully native (pure c++)


If you do not want any c++ code (or do not want to use the QDE), then you are better off with WebWorks. (see the non-native forums/documentation for that)


But if you dont mind some very small snippets of c++ and also don't mind using QDE, then you can go the QML route...server communication can be achieved using plain XMLHttpRequest in javascript (see the Qt docs for that)


Also i've successfully used WorkerScript as per Qt QML documentation to avoid c++ as much as possible and maintain a very fluid UI/UX...you simply need to import QtQuick in your QML. 


so yes you can avoid a lot of c++ but when you get into very customized UI, you won't be able to avoid c++ much Smiley Sad