A ga dget is nothing but a mini web app that runs within a simple web page or a portal. The following figure shows two such examples, available in Netvibes, a public portal:
Designing gadgets is rather easy. Only HTML, XML, and JavaScript are needed. The HTML code and the JavaScript code (Flash code is another option) are encapsulated in an XML file. It contains three distinct parts:
<Content>
) is the actual HTML and JavaScript code that contains the whole logic of the gadget<UserPrefs>
) define controls that can be used on the gadget<ModulePrefs>
) that defines such things as the width of the display, its title, or its authorGoogle proposes a variety of tag libraries and JavaScript code that speeds the development of gadgets for various environments. The following table lists a few examples:
Name of the API or Library |
Description |
Execution Context |
---|---|---|
Allows the design of gadgets that act on the content of mail. They can offer advanced preview features for some audio or video content. |
Does not matter | |
Allows the design of sophisticated gadgets that use Google Calendar's data and events. |
Does not matter | |
This API allows an aggregation of several external data sources for publication in Google Sites. It allows circumvention of some security restrictions that apply to dynamic web content. |
Google Sites | |
Allows you to design robots and gadgets integrated in Google Wave. Their main purpose is to automate some conversion or translation tasks. |
Google Wave | |
This is for designing gadgets that improve Google Docs or other applications, which use spreadsheet features. It enables designing alternative graphical representations of the content of a spreadsheet or combine the content with other sources. |
Google Spreadsheet |