Local OpenSocial Development and Testing with Happyhour

Posted on 07 May 2008 by Johannes Fahrenkrug. Tags: javascript programming opensocial
For quite a while I've been working with Google OpenSocial on both Orkut and MySpace. Development is a little tedious because you always have to upload your code changes and then refresh the OpenSocial gadget in the container (MySpace for example) to try it out. Yesterday Justin mentioned something interesting in a posting on the OpenSocial group. It's called Happyhour and it's an OpenSocial container implemented in JavaScript and Google Gears. It implements the 0.7 OpenSocial specs. You don't need any server and can locally test your OpenSocial gadgets, which is really nifty!
Here's a short video chat with it's creator, Chandra Patni:

So how do you get it to work? Easy:

  1. Go to Google Gears and install it.

  2. Go to Happyhour and download the latest release and unpack it.

  3. Now open the index.html and you'll be greeted with this screen:

So you see that the user John Doe with the ID 1 has 4 friends. In the top bar you can set the viewer and owner ID, the Widget URI and the view, profile or canvas (among other things).

Now you're set up to test your OpenSocial app locally! You need to have the application available locally (or on the same machine Happyhour is hosted on). So I went ahead and downloaded my OpenSocial sample application (you'll have to check it out via SVN).

I set the owner and viewer IDs to 2, 3, 4, and 5 and set the color to red three times and once to blue:

Then I went back to viewer and owner ID 1. Behold the result:

So it really works beautifully! I'm surprised this great tool slipped under my radar for so long.
Please tell me how you use Happyhour and what caveats and workarounds you've found.


Anonymous said...

Cool, I also tried using the shindig but I could not install, this seems more practical.

March 22, 2010 12:01 AM

Johannes Fahrenkrug said...

I'm glad it was helpful to you, Adrian. Thanks for your comment.

October 30, 2008 08:43 AM

Anonymous said...

Very interesting. I was trying to get Shindig setup on Ubuntu but without any luck, this might work for me also! Thank you very much!


October 29, 2008 03:44 PM

Anonymous said...

Great! It's that I was searching for!!

September 10, 2008 01:53 PM

ronald said...

Thanks, very useful!

May 15, 2008 06:39 PM


Please keep it clean, everybody. Comments with profanity will be deleted.

blog comments powered by Disqus