Link: http://www.cnblogs.com/biggates/archive/2008/01/04/1026587.html
First let's take a look at the http://code.google.com/apis/gadgets/docs/gs.html#GGE, this is GGE, Google gadgets Editor, an online gadget Editor, Google provides the edit and preview tabs for us to edit, you can also add this GGE as a widget to the igoogle homepage, which is really good.
Similarly, some common gadget templates are provided for us to modify, such as the famous "Hello World ":
1 <? XML version = "1.0" encoding = "UTF-8"?>
2 <module>
3 <moduleprefs Title = "Hello world example"/>
4 <content type = "html">
5 <! [CDATA [Hello, world!]>
6 </content>
7 </module>
As you can see, a gadget is actually an XML file. We can use HTML for the layout of the gadget, or use JavaScript to add dynamic effects to the gadget.
Http://code.google.com/apis/opensocial/docs/javascript/index.html here is the opensocial API.