Does Backendless have a full-featured SDK that works with Appcelerator?

Just wanted to find out if I can switch to use Backendless.com for my existing Appcelerator app ?

Hello Lester

You can use our JS-SDK in the usual way, but before you need to apply this patch for Appcelerator because this env has a little difference with Browser/NodeJS env.

Regards, Vlad

Thank you, i’ve tried but i got this error:

“Backendless got error - Network Error”

When i put wrong AppId or Key, then there is no error and also no updates. But when put with the AppID and JsKey, it shows the above error.

My code:

require(‘folder/backendless-appc’);
Backendless.initApp(AppId, JsKey);

Backendless.Data.of( “TestTable” ).save( { foo:“barXX” } )
.then( function ( obj ) {
console.log( "Backendless object saved. objectId " + obj.objectId );
} )
. catch ( function( error ) {
alert( "Backendless got error - " + error );
});

What did i missed?

Hi @Lester_Tan

Have you tried to debug?
Generally “Network Error” is a client error

Regards, Vlad

That’s the code i used above, it just didn’t work.

try to add logging into onerror handler in the patch

    request.onerror = function handleErrorEvent(e) {
      Ti.API.debug(e.error);

      reject(new Error('Network Error'));

      request = null;
    };

btw, here is a doc of Titanium’s HTTPClient https://wiki.appcelerator.org/display/guides2/HTTPClient+and+the+Request+Lifecycle

Regards, Vlad