Hi,
The main benefit of Coronium Cloud is Lua coding on both client and server. App42 (shephertz.com) has a much more robust platform in a number of ways, but I just wanted to make it clear for people new to Lua, or looking to match back-end Lua to front-end (Corona SDK) Lua.
All cloud code using App42 will need to be built in Java if you need to extend it in any way. Coronium Cloud has a ridiculously simple Lua Server-Side API for cloud code. The Coronium Client API for Corona SDK is extremely simplified as well. As a comparison:
App42 - Saving additional Data along with User in Corona SDK
local userName = "Nick" local pwd = "\*\*\*\*\*\*\*\*" local emailId = "nick@shephertz.co.in" local dbName = "\<Your\_DataBase\_Name\>" local collectionName = "\<Your\_Collection\_Name\>" local jsonDoc = {} jsonDoc.name = "John" jsonDoc.age = 20 local App42CallBack = {} App42API:setDbName(dbName); App42API:initialize("API\_KEY","SECRET\_KEY") local userService = App42API:buildUserService() userService:addJSONObject( collectionName, jsonDoc); userService:createUser(userName,pwd,emailId,App42CallBack) function App42CallBack:onSuccess(object) print("userName is "..object:getUserName()) print("emailId is "..object:getEmail()) print("getDocId is "..object:getJsonDocList():getDocId()) print("getCreatedAt is "..object:getJsonDocList():getCreatedAt()); print("getUpdatedAt is "..object:getJsonDocList():getUpdatedAt()); print("Doclist Name is "..JSON:encode(object:getJsonDocList():getJsonDoc())); end function App42CallBack:onException(exception) print("Message is : "..exception:getMessage()) print("App Error code is : "..exception:getAppErrorCode()) print("Http Error code is "..exception:getHttpErrorCode()) print("Detail is : "..exception:getDetails()) end
Coronium Cloud - Saving additional Data along with User in Corona SDK
[lua]
local mc = require( ‘mod_coronium’ )
mc:init( ‘APPID’, ‘APIKEY’ );
mc.showOutput = true
local userObj = { email = “me@home.com”, password=“pw123”, color = “red”, dogs = {‘coco’,‘wiggles’} }
mc:registerUser( userObj, function( e ) {
if e.error then
print( e.error );
else
local userId = e.result.objectId
end
});
[/lua]
The result properties will ’ print’ in the console automatically because of the the showOutput flag.
Learn more at http://coronium.io
Best,
Chris