| Free tutorials for Java, Eclipse and Web programming |
Version 1.1
Copyright © 2009 -2010 Lars Vogel
18.04.2011
| Revision History | ||
|---|---|---|
| Revision 0.1 | 25.11.2009 | Lars Vogel |
| created | ||
| Revision 0.2 -1.1 | 28.11.2009 | Lars Vogel |
| bugfixes and updates | ||
Table of Contents
OpenSocial Gadgets are part of the Open Social initiative. OpenSocial Gadgets are web based UI components. A Gadget is defined via a XML file which contains a header with definitions of the Gadget and an embedded content payload. This payload is a combination of HTML and JavaScript which defines the gadgets look and behavior.
A very simple Gadget looks like this.
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Hello OpenSocial Gadgets!">
<Require feature="opensocial-0.8" />
</ModulePrefs>
<Content type="html">
<![CDATA[
Hello, OpenSocial Gadgets!
]]>
</Content>
</Module>
A Gadget has always the root tag <Module>. This root tag contains a <ModulePrefs> and a <Content> section. The ModulePrefs contains information which OpenSocial features are required by the module and information about the author. The content section contains the actual HTML and JavaScript.
A Gadget is hosted in a server infrastructure to provide its data. A web page that hosts gadgets is called an OpenSocial.
Most websites which work as a OpenSocial Container uses the Apache Shinding reference implementation.
For example the iGoogle , LinkedIn, MySpace, orkut, XING can host OpenSocial Gadgets. The only exception is Facebook; they have their own standard.
For detailed information you can read the latest released Open Social Specification .
Open Gadgets Gadgets are specified in OpenSocial Gadgets API Specification .