Thursday, June 11, 2009

Gadgets and Widgets Oh My!

In this blog post I thought I would talk about OpenSocial Gadgets since Google starting promoting Gadgets last week by way
of having celebrities share their iGoogle setup with selected Gadgets.
At a high level a container site like iGoogle ( let's users add gadgets to their customizable home page.
A gadget is a web application in itself, and can do pretty much anything a standard web page can do (except its real estate/size on page is restricted).
For example, you can add Espn's gadget to your iGoogle page, and it will display headlines from Espn. You can also add things like a weather gadget, and even a Google gmail gadget so you can read your email without leaving iGoogle. As an avid internet user I find that after a while, I can end up with 20 or more browser tabs or browser windows open when I'm browsing thru my favorite sites. However, if all my favorite sites had gadgets I could just have 1 tab open to iGoogle and I browse my favorites from all in one place. It is great for consolidating and streamlining how you use the internet.
Being a fan of making users internet experience better, I took the plunge and developed a OpenSocial Gadget for
To add the Gadget to your iGoogle page just click the google icon on the bottom of the site.
If you are developer and want to take the plunge I have a few suggestions.
There is some good documentation out there. The first documentation to read is the igoogle developer's guide,
After reading thru the majority of this documentation, it is a good idea to create a simple Hello World gadget using google's sandbox.
If you need to utilize security/authentication to pull data from your site, then you will need to implement OAuth. It is a good idea to first read the documentation and demos
at .
A good code example of using OAuth from both a provider and consumer perspective, is
If you are going down the OAuth path and are choosing to create a Gadget for iGoogle, your site will need to implemented an OAuth Provider.
I have implemented an OAuth provider using the Open Source MVC framework for .Net (C#) Castle MonoRail, if anyone using Castle MonoRail is interested in
viewing or using my OAuth provider code let me know by leaving a comment and I can share it via
In a nutshell, you will need a Container (iGoogle), a OAuth provider (your site), and your Gadget code (an xml file).
Once you have picked your Container (google has one as does yahoo, myspace, etc), written your OAuth provider code, and have a some Gadget code,
you should test all your code locally. This way you can have your own local sandbox to step thru your code as you work out the kinks.
How can I implement a Container like igoogle locally? Well, the short answer is that you can use Shindig which is an open source container.
It is available here:
If you want to setup Shindig, see my March 16th blog entry below.
There are major benefits to using OpenSocial and OAuth. Both projects are standards driven meaning that they work with lots of different sites and vendors
to come up with best standards for all parties involved. This means that lots of sites are using OpenSocial and OAuth. The major players being Google, Yahoo,
Twitter, and MySpace. Once you implemented OpenSocial and OAuth for one of these sites, it will be very easy to integrate with the other sites. This means developers
don't have to write separate integration code for each site. Developers can use the DRY principle (don't repeat yourself).

No comments:

Post a Comment