flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerry Hamby <jerryha...@vdex.com>
Subject Re: backends - parse/backendless/roll your own
Date Wed, 14 Aug 2013 16:38:48 GMT

Here are some links to get you started:

http://apigee.com/docs/usergrid/content/quick-start  (open an account)
http://apigee.com/docs/usergrid/content/what-app-services (overview)
http://apigee.com/docs/usergrid/content/data-model (data model)
https://blog.apigee.com/taglist/usergrid (videos and articles)

I think the best thing you can do is to create a free Apigee "App Services" account and build
some small examples:

Here is small example of how I POST an entity inside a collection (MySQL speak: record inside
a table)
Note: encode to JSON before sending and decode after receiving 

public function mBuildToDoEntity(vType:String, vMessage:String, vGroup:String):void {
	var vToDo:Object = new Object();
	vToDo.todotype = vType;
	vToDo.groupname = vGroup;
	vToDo.message = vMessage;
	vToDo.status = "false";

public function mPostToDo(vObj:Object):void {
	var vTempJSONString:String = com.adobe.serialization.json.JSON.encode(vObj);
	var ajax:HTTPService = new HTTPService();
	ajax.addEventListener( ResultEvent.RESULT, mGoodResults );
	ajax.addEventListener( FaultEvent.FAULT, mFailedResults );
	ajax.url = ('https://api.usergrid.com/'
		+ (YOUR ORG NAME GOES HERE) (example:TeamPrem)
		+ (YOUR APP NAME GOES HERE) (example:sandbox)
		+ '/todos);
	ajax.method = "POST";
	ajax.contentType = "application/json";
	ajax.resultFormat = "text";
	ajax.request = vTempJSONString;
	function mGoodResults(vResponse:Object):void{
	     trace("mPostToDo IN RESPONSE mGoodResults vResponse.result = "+vResponse.result);
	     var vTempJSON:Object =  com.adobe.serialization.json.JSON.decode(vResponse.result as
String, false);
	function mFailedResults(vResponse:Object):void{
	     trace("mPostToDo IN RESPONSE mFailedResults vResponse.statusCode = "+vResponse.statusCode);

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message