Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I host a Google gadget? How does it work?

I just spent 5 hours by checking Google gadgets websites and FAQs, but I still have no idea how to host a gadget.

What I've figured from reading the Google documentation:

  1. I can write gadgets with XML, JavaScript etc..
  2. Gadgets can be added to iGoogle etc..
  3. Google can host the gadgets for you.
  4. Gadgets can be hosted anywhere else???

All of the above information doesn't answer my question. For instance, with jQuery or Dojo Toolkit, I can download the JavaScript framework and use it. With Google gadgets, I can not find a download link for a framework. Why? Does Google provide its framework? If not, why does the documentation indicate that gadgets can be hosted anywhere? I am totally confused.

A brief explanation or some helpful links are very welcome! Thanks a lot!!!

like image 900
SSS Avatar asked Feb 04 '23 05:02

SSS


2 Answers

I've just been trying to get my head around all this myself and most of the information out there seems to be about building gadgets, not the infrastructure of hosting them.

Essentially the way it seems to work is that you need:

  1. Somewhere to host the XML file that defines the gadget. This can be anywhere on the web.
  2. A Google Gadget container - you tell this the URL of the XML file for your gadget and it does the magic to turn your XML into a rendering gadget. Examples are iGoogle http://www.google.com/ig, Google Friend Connect http://www.google.com/friendconnect/ and Shindig http://shindig.apache.org/
  3. A site to actually display the Gadget - this can either be a site with the functionality inbuilt such as iGoogle or can be any website on which you put the embed HTML for the gadget. This embed HTML will vary according to the container. If you go to a gadget in iGoogle, that you've either added or is in their directory, you can see the embed code for the gadget. For Google Friend Connect, there's a snippet of HTML and Javascript that you can use, in which you put the URL of the XML file and your Google Friend Connect site id.

The fact that some sites such as iGoogle do 1, 2 and 3 is I think what initially made things slightly confusing for me.

like image 98
jvvw Avatar answered Jun 05 '23 18:06

jvvw


You can create a gadget defining an xml spec (reference) and host it anywhere you want (ie. your dropbox public folder). The xml will have a Content section with the html for the gadget. There you can include script tags with any js library you want to use (ie. jquery, dojo, your own js files).

If you want to install the gadget in iGoogle, you need to go to 'Add Stuff' and instead from picking a gadget from the directory, you click on 'add rss or gadget' link and enter the url to your gadget xml file. The container (in this case iGoogle, but could be Orkut, MySpace, etc) will pull your gadget spec and render the gadget.

Here's a good place to start with gadget development

like image 26
Alejandro Bologna Avatar answered Jun 05 '23 17:06

Alejandro Bologna