Fluffy Puffy Cloud Pets 3 Day Project

March 14, 2009 § Leave a comment

This is my first time participating at Weekend App. We formed a team on the spot and build a OpenSocial app in 3 days launching officially in MySpace.

Our “Fluffy Puffy Cloud Pets” app gained over 3,000 users in less than 7 days. This Virtual Pet social app is designed and integrated with Virtual Good and Virtual Currency from day 1. We did make $ on the first day.

I was invited to present our app at Asian Pacific Women Technology (APWT) event.

Advertisements

JSONP: JSON with Padding

March 6, 2009 § Leave a comment

JSONP is a technique allowing JavaScript-only calls to an external server without the need for a proxy to make the call.

JSONP is JSON with Padding. A JSONP call is made to manipulate the host web page’s DOM to dynamically add a script tag. This script tag will remove the server endpoint (REST/Web Service).

This process involves adding a callback method to the query string of the JSONP request. The Javascript method appends the callback method to the body response. The response is wrapped as a parameter to the callback method, similar to the concept of “padding”.

JSONP has many advantages over makeRequest call in MySpace OpenSocial APIs. makeRequest creates more network trips and may trigger multiple points of failure.

JSONP is restricted to GET call only on MySpace Canvas Surface only.. It is restricted to JSON data. JSONP is a hack that is quick and easy to make cross-domain requests from JavaScript.

The drawback is it is difficult to debug JSONP requests.

/**
* Create a JSONP request
* @param {object} url
* @param {object} callback
*/
function makeJsonpRequest (url, callback) {
var jsonpurl = url + “&callback=” + callback;
var e = document.getElementsByTagName (“jsonp”)[0];
var s = document.createElement(“script”);
s.src = jsonpurl;
e.appendChild(s);
}

Useful MySpace Application For Developers

February 20, 2009 § Leave a comment

These are useful applications you can install to test your MySpace application code. This is designed for MySpace developers.

OpenSocial v0.8 Editor
http://profile.myspace.com/index.cfm?fuseaction=user.viewProfile&friendID=444791946

Code Sandbox
http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=117879

Where Am I?

You are currently browsing the MySpace category at Web Builders.