One of the major updates to OpenSocial in the latest version is a new programming model that allows you to send social data directly from the container to your application's server, where you can use the data to render any content you want to show the user. This model lets you use your existing presentation layer (faster coding!) and reduces the number of requests needed to pass social data between clients, containers, and your app server (faster apps!). Here's a closer look...
Many apps want to combine the social data from the container with the application data that lives on their server. In previous iterations of OpenSocial, many apps did something like the following:
- Client requests profile and friend info from the container (via DataRequests)
- Container responds with the social data
- Client requests application data from a remote server (via makeRequest)
- Container proxies request to remote server
- Remote server responds to container with application data
- Client combines the social and application data and presents it to the user (via JavaScript)
- Client requests an application view
- The container sends social data to the remote server
- The remote server combines social and application data, returning HTML and JavaScript
- The container sends the content to the client
Happy coding!

1 comments:
This is awesome. A good step in simplifying opensocial.
Post a Comment