Cross-container Development
From OpenSocial
Contents |
There are hundreds of millions of people using social networking sites that support OpenSocial apps. To take advantage of the distribution that OpenSocial provides, you'll want your app to run on more than just one site. There are a few things to consider when writing or maintaining an app that works across containers. This page will give you an overview of these issues, and you can find tips for reaching users on specific containers by following the links in the Containers section.
Issues
Submission
Most containers require that you submit your app to be reviewed before users can find your app in the directory. Each container has a different process for reviewing (and re-reviewing) your app. Check out the container-specific sections below to find out what to expect when submitting your app on a particular container.
Views
OpenSocial defines four views - profile, canvas, preview, home. Containers tend to support a subset of these four views. For example, orkut supports a profile and canvas view, but not a preview or home view. Be sure to implement all the views supported by the containers you're building for.
Sometimes the use case for a view is different between containers. For example, the home view usually represents the use case where the only the owner can access the page, so you could include private information in this view of your app. However, this isn't defined in the OpenSocial spec, so a container could have a home view that supports a different use case. Be sure you understand the use cases associated with each view when deploying to a new view. Containers often supply an "anatomy" document that explains the views they support. For example, orkut's anatomy doc is here, and hi5's anatomy doc is here.
Layout
The same view can have different sizes across containers, which can wreak havoc on your layout. Sometimes it's sufficient to just design your layout to work on the container with the smallest area for a specific view, but this may limit how your app uses the real estate on container that provide more space. Be sure to test your app in all the views on a new container to make sure it looks okay. Check out the container-specific sections below for info on the dimensions associates with each view.
Implementation Differences
OpenSocial defines an API - it's up to the containers to implement that API, which can lead to some discrepancies in the functions supported or fields your app will have access to. Some containers also support special extensions, like access to photos, which you can't expect to work on all containers.
The OpenSocial Across Containers tech talk from Google I/O covers some basic techniques for dealing with implementation differences between containers.
Also, check out the OpenSocial compliance tests, which can run as a gadget in any container and produces results in this [http://opensocial-compliance.appspot.com/ compliance matr
Policies
Each container has its own policies that define how your app should behave, and what actions are prohibited. Sometimes these policies can even affect the implementation of your app, like whether IFrames are allowed or not. Knowing what is and isn't allowed on each container will help your app get approved faster and help you avoid any negative effects of breaking the rules.
Language
Social networking is popular all over the world and these sites tend to be popular in specific geographic regions. The more languages your app supports, the more users you can reach. OpenSocial lets you manage translations using message bundles, or XML files that contain the strings used in your app. Check out this article on localization to see how to use message bundles in your app.
Certificates
Some containers sign requests with certificates. Here's the current list: https://opensocialresources.appspot.com/certificates
Containers
These two tables provide information about all OpenSocial containers that are live to users (the first table) or running developer sandboxes (the second table). In addition, to understand the best practices for developing an application to target many containers, and thus have the most reach potential, please visit the Cross-container development page.
The following containers are live for all users:
The following containers are open to developers (see Status column for details):
| Container | Current Version | Developer Site | Status | Cross-container Development |
|---|---|---|---|---|
| BIGADDA | v0.8 | BIGADDA Developer Info | Limited developer access | details |
| iGoogle | v0.8 | iGoogle Developer Site | Open sandbox access worldwide | details |
| lokalisten | v0.8 | lokalisten Developer Site | Open sandbox access | details |
| Yonja | v0.8 | [1] | Limited developer access | details |
| Gmail | v0.8 | Gmail | Live as a Gmail Labs feature | details |
| Google Calendar | v0.8 | Calendar Gadgets documentation | Live as a Calendar Labs feature | details |
| CityIN | v0.7 | CityIN Main Site | Application review required | details |
| Elgg | v0.7 | Elgg Developer Site | Development Platform | details |
| minglebox | v0.7 | minglebox.com | Limited developer access | details |
| imeem | v0.7 | imeem Developer site | Open sandbox access | details |
| Tianya | v0.7 | Tianya Main Site | Send an email for more information. | details |
| Viadeo | v0.7 | Viadeo Developer Site | Open sandbox access | details |
| OpenNetworx | v0.7 | OpenNetworx Developer Site | Application review required | details |
| Plaxo Pulse | v0.5 | Plaxo Gadgets Page | White-listed apps available for users | details |
Many Chinese developers are working hard to introduce opensocial to China, including containers, apps, hosting service providers and localization companies. Follow Go To China for detailed information!
Want to add a new container to this list? Follow these instructions
