The OpenSocial Gadget XML Specification
While Shindig and Partuza are tools for building an OpenSocial container, the gadget XML specification is a tool for building application gadgets to run within a container. This XML specification file contains a series of configuration settings and data that allows the container to load the application content and information.
A gadget XML file contains a few main nodes (or elements). The
root Module
node contains
three child nodes, ModulePrefs
, UserPref
, and a series of Content
nodes. ModulePrefsk
defines the characteristics (metadata) about the application,
UserPref
allows gadgets to define
user-specific data, and the Content
nodes contain the code for the gadget views.
This is the standard format of a gadget XML file:
<?xml version="1.0" encoding="utf-8"?> <Module> <ModulePrefs ... /> <UserPref ... /> <Content ...> Gadget Content </Content> </Module>
In the sections that follow, we’ll explore the content of each node and the possible configurations for building out a gadget.
Get Programming Social Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.