Building OpenSocial Apps
A Field Guide to Working with the MySpace Platform

An in-depth look at Google's OpenSocial specification.

By: Staff


OpenSocial was first released in November 2007, originally running only on Google's own Orkut social network. OpenSocial is a set of APIs that let applications access data and functions on social networking sites that implement the specification. If you think this sounds a bit like the FaceBook Platform, it is basically that- however one that is not controlled by one single company; while Google originally created the specification, based on their own Gadgets framework, it now exists as an open specification administered by the OpenSocial Foundation. Today a number of social networking sites besides Orkut support it ranging from social networks like Friendster and Hi5 to business networking LinkedIn, but probably the best known is MySpace which was one of the first to adopt it in 2007.

Being first to support a developing specification often means that inconsistencies will crop-up between the implementation and the official specification. Since the authors have been involved with OpenSocial since the beginning, they provide numerous stories about how the specification developed, and how it's roots led to certain design decisions. At the time of writing, the specification is 0.9 as well, the book is specifically about creating applications that run on MySpace, so there are a number of quirks between the official specification and MySpace's implementation. While these don't seem to be major, they need to be observed and the writers do a good job of explaining the quirks and how to handle them. With that in mind, Building OpenSocial Apps takes readers right from the first MySpace "Hello World" into full applications.

The book starts off with creating the traditional "Hello World" application before moving into more advanced topics. Essentially the book is broken down into three sections: building an application on MySpace's servers, creating apps that run off other servers (necessary for larger applications) and dealing with growth and security. Throughout the book, the readers work with a simple Tic-Tac-Toe game (is there any other kind?) that can be downloaded and is used as a starting point for learning about the MySpace Developer Platform and OpenSocial.

This book is not really aimed at beginners, while the programming is done with JavaScript/HTML and Python, there's no attempt made to teach either language. Besides the languages, readers should be familiar with web programming in general; while terms like REST are explained, your pretty-much expected to know how to use it already. One nice surprising find in the book was it's use of Google's App Engine for server-side programming. Again, this isn't a book about writing for the App Engine (readers might want to pick up Apress' Developing With Google App Engine) but you learn enough of the fundamentals to get going. App Engine is one of a number of cloud computing services that are useful as your application grows so it makes sense to employ it here.

Overall, this is a good hands-on book on how to write social web applications that run on the MySpace Developer Platform. While it's not a tutorial for beginners to web programming, it does enough "hand-holding" to guide programmers already familiar with JavaScript, XML, REST and Python through creating a fairly complete application that can be installed by MySpace users. What's more, while the book is MySpace-specific where it has to be, there's a lot of practical OpenSocial advice that will be useful as the platform matures and grows in popularity.

Date published: 20-Dec-2009






Using the Dojo to build better websites.

Prototype and script.aculo.us

Using the Prototype and script.aculo.us Javascript libraries to simply your life.

Pro Javascript Techniques

John Resig knows Javascript.

Learning jQuery 1.3

Learning to use jQuery to build better websites, though examples and popular plug-ins.

High Performance JavaScript

Performance is in the details.


2017 YYZTech

For American computers stores, visit: AmericanComputerDealer.com