MySpace Beta Launches OpenSocial 0.9 OSML and Data Pipelining
December 8th, 2009 | Published in Google OpenSocial
MySpace is announcing the public beta of OpenSocial 0.9 with OSML and Data Pipelining.
For off-site developers and API-based apps, we've had OpenSocial 0.9 REST APIs available for a few months, go check it out. This beta launch represents the second half of an exciting and feature-packed release of OpenSocial on the MySpace Developer platform.
"What does OpenSocial 0.9 do for me on MySpace?" you might ask. There are lots of great things:
* A simple tag-based syntax for accessing data (Data Pipelining).
* A powerful template system for defining reusable content as "custom tags" for server-side or client-side rendering (OSML).
* A rich expression language for accessing data (OpenSocial Expression Language - or OS EL).
* Improved Gadget XML support for writing cross-container apps.
* Internationalization support with message bundles.
* Faster renderings performance
Now, instead of writing 30+ lines of JavaScript code with requests and callback handlers to get a list of friends, one Data Pipeline tag can retrieve this data:
If your app needs to display and format data and UI components, it can be done with OSML markup instead of JavaScript. To define a tag "myapp:PersonBlock" showing a person's name and image in a box, use the following markup.
For off-site developers and API-based apps, we've had OpenSocial 0.9 REST APIs available for a few months, go check it out. This beta launch represents the second half of an exciting and feature-packed release of OpenSocial on the MySpace Developer platform.
"What does OpenSocial 0.9 do for me on MySpace?" you might ask. There are lots of great things:
* A simple tag-based syntax for accessing data (Data Pipelining).
* A powerful template system for defining reusable content as "custom tags" for server-side or client-side rendering (OSML).
* A rich expression language for accessing data (OpenSocial Expression Language - or OS EL).
* Improved Gadget XML support for writing cross-container apps.
* Internationalization support with message bundles.
* Faster renderings performance
Now, instead of writing 30+ lines of JavaScript code with requests and callback handlers to get a list of friends, one Data Pipeline tag can retrieve this data:
If your app needs to display and format data and UI components, it can be done with OSML markup instead of JavaScript. To define a tag "myapp:PersonBlock" showing a person's name and image in a box, use the following markup.
Any data declared with Data Pipeline tags can be easily accessed via the OpenSocial Expression Language (OS EL) within your app. The code to show the name of the first friend in the friend list registered under the key "myFriends" is as simple as this:
The first friend's name is: ${myFriends[0].displayName}
Improved Gadget XML support means your app's source code can be managed with a single code file. Porting between other OpenSocial containers will be greatly simplified. We're also exposing REST APIs for app management. You'll be able to wire in your favorite code editing tools for app management.
As part of the improved Gadget XML support and the new OS EL, you can easily internationalize and localize your app to be used in different cultures. The text of your app can be defined in different message bundles and accessed via OS-EL statements. A "Hello World" app supporting English and Spanish would contain code as below:
...
${Msg.greeting}
Over the next few weeks we'll be diving into the features of 0.9 in more depth, adding tutorials, and building sample apps to get you up and running, so stay tuned. There will be a number of tutorials on creating OSML apps linked to from the OpenSocial Version 0.9 Wiki Page. For now, you can create a friends list app as follows:
1. Go to the developer site, sign in, and create a new On-site app named "My Friends".
2. On the Upload App XML page, scroll down and click the (Beta) App Gadget Source Editor button
3. Click the Install button on the gadget editor screen to install the app you've just created.
4. Insert the below code in the source text box and save: