Sunday, March 14, 2010

YAP 2.1 with OpenSocial 0.9 Support

The launch of version 2.1 of the Yahoo! Application Platform (YAP) introduces significant improvements to integrate OpenSocial 0.9 and the Shindig backbone support into YAP. This upgrade eases the migration of an application from one OpenSocial container to another and greatly reduces the barrier for entry for existing OpenSocial developers.

What does the migration to a Gadget XML format mean for my application?

All existing YAP applications that were built using our old dashboard system will be automatically migrated to the new OpenSocial Gadget XML format. This means that they will continue to run as they do today, without any code changes on your part.
This upgrade will also let you:
  • modify your application via a gadget XML file hosted on your server
  • take full advantage of the OpenSocial APIs
  • increase your application's portability to other OpenSocial-compliant containers
Developers will be able to go into the developer dashboard to download the auto-generated XML spec file or import an existing spec file to overwrite their current application configuration settings.


What are some of the major improvements in OpenSocial 0.9?






OpenSocial 0.9 introduces a new lightweight API for accessing social data from a container such as YAP. This means that your code to accomplish the same tasks will shrink. Let's take a look at what this breaks down to (samples taken from the OpenSocial 0.9 release notes):
Requesting the viewer in OpenSocial v0.8





01.var req = opensocial.newDataRequest(); 

02.req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER), "req");
03.req.send(callback);





Requesting the viewer in OpenSocial v0.9
01.osapi.people.getViewer().execute(callback);


As you can also see, the new API has a different namespace (osapi). This means that your OpenSocial 0.9 code will not muddle with your 0.8 code, and your requests will all be nicely sandboxed.


OpenSocial Support

YAP supports the OpenSocial 0.9 JavaScript APIs and OpenSocial 0.8.1 RESTful API. The code for your Canvas 
View can include calls to the OpenSocial JavaScript APIs; YAP filters all JavaScript with Caja. Small View does not support JavaScript.

For further details see:
































































No comments:

Post a Comment