You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Setting up an OpenSocial container with Shindig

The following is a basic overview on how to integrate shindig into an existing social network site, to allow it to host OpenSocial applications.

We assume you already have a social network, that's to say, a site with registered users and a notion of "friends". Your site needs to be able to render customized pages for each user. Useful, but not required, is a way to send messages between users and a notion of an "activity stream" that lists actions that the friends of a given user have taken recently.

Sindig provides, on top of this infrastructure, a rendering engine for gadgets, a translation layer from your data to the OpenSocial data types, and an implementation of the communication protocols required for the gadgets to access that data.

Shindig does not provide an application directory, nor the specific pages inside which the gadgets will render.

Getting shindig

Get the released version and dependencies.

Get from the source repository.

    • download the 1.0 branch or tag
    • build with maven

Interfacing shindig to your data

The *Service interfaces

they need to

  • Decode arguments (translate ids, filter names, ...)
  • Perform validation & authorization that the backend does not handle
  • Send queries to the backend - translate the responses to the model.* interfaces.
  • Filter & sort, if the backend didn't.

Implement OAuth handling

Guice Module

Configuration.

  • config/container.js - Declare your list of supported fields for each datatype, configure url templates for proxying, navigation, etc. Configure use of secure tokens.
  • common/conf/shindig.properties - http caching and rewriting config.
  • Whatever configuration your classes need.

Deployment

Integrate with your site

  • Create an application directory. This will list available applications, allow users to install/remove, track any sort of permissions for the application (Can it use the home view? can it send messages?, etc) and store the information from each app (url, oauth secrets, other metadata).
  • Create a userPrefs mechanism.
  • Create the container pages for the different views (home, profile, canvas) What views make sense depend on your site.
  • Generate tokens for the iframes.
  • No labels