Thursday, May 31, 2007

Adam Sah on Google Gadgets API

What are Gadgets?

HTML inside an XML wrapper. Anything that you can do in a web page, you can do inside a gadget. The promise is that you can write this one, run it anywhere, and you get free hosting and bandwidget thanks to Google Code project hosting and Google Pages.

What does everywhere mean?

Google Gadgets are not just about iGoogle:

Google Desktop, Max OS Dashboard, Enterprise (IBM WebSphere Portal), third party websites, ... and now via Mapplets.

To see this you can even add the date time clock, or a map widget.

8000 published gadgets, and over 800M page views a week.

Who writes gadgets?

A large range. From hobbyists, to professional programers, to businesses.

Anatomy of a Gadget

As simple as this.

<ModulePrefs ... />
<UserPref ... />
<Content ..... />

Adam shows how easy it is to get going. Hello World is simple, but you can also enter another gadget and riff of of that. The view source paradigm really kicks in here.

The API also gives you interesting functionality such as tabs, mini messages, dynamic height management, analytics, and more.

To get these features you simple <Require feature=".." />

Tech Tips
  • Weekly page views are display in the Google Gadgets for your page directory.
  • Simple way to embed Flash: _IF_EmbedFlash("....swf", container, { })
  • Fetching remote content. Google will proxy cache. HTML, text, XML, JSON. Wrapper functions let you fetch feeds in different ways (e.g. _IF_FetchFeedAsJSON(...))
  • Internationalization support: <Locale lang="de" messages="de.xml">
  • Storing State: var prefs = new _IF_Prefs(); prefs.set("text", "foo")
  • Caching External Resources: Google caches all gadget XML files, all requests going through _IG_Fetch methods
  • Configure the gadget the way you want, and then get the code to install anywhere
Q & A

  • Q. Can you get data after the gadget is initialized? Yes, and that happens by default
  • Q. In what way does a gadget drive traffic to a website? Adam answers by example. The horoscope adds a link at the bottom to point you over to their site where they can monetize you
  • Q. How suitable is this as a mechanism for a B2B environment? IBM implemented this in WebSphere portal, and other enterprises are putting out gadgets to represent their products. Today the most popular gadgets are dual use (e.g. Google Calendar)
  • Q. What is the portability story between the desktop and the web version? Web based gadgets are the most portable, and they run inside of desktop.
  • Q. How do you handle versioning of gadgets? No version stamp in the metadata, so authors just use different XML files with the version in the URL itself. Most just upgrade in place, and handle backwards compatibility
  • Q. Have you done testing on non-PC devices? Gadgets need HTML and JavaScript.
  • Q. What security is built-in? Gadgets are in iframes, so gadgets can't talk to the container, and vice versa
  • Q. As a gadget developer how do you get feedback about your gadget? Analytics will show you the traffic. A feedback form is on the details page of the gadget.
  • Q. Do you know of any kids creating gadgets? Took bets on the top gadget authors will be. Sure enough, a 16 year old was the top author for the first 6 months.


djspark said...

I don't know where else to say this, but the Brazilian version was *totally* oriented to dumb managers and advertisers, NOT developers.
(how to choose a template in adsense ?!)

A real shame.

The other important thing is: Whoever complained in their blog about this, had the commentary deleted. Just like that.

I just hope someone from google notice that.

Anonymous said...

siğjngh said...

hi, i'm tico, and my question is if google think in a office in Costa Rica