zondag, augustus 17, 2008

 

Google Gadget

I've experimented with Google Gadgets. Gadgets are little pieces of web applications that you can plug into your personalized home page such as iGoogle or add to the Google sidebar.

The one I made simply lists a random trivia question, taken from the about2findout.com database, and refreshes it every 5 minutes. If you hover over the questions you get the full question and question type, and there's a button to show another random question. Plain and simple.
Clicking on the question will open a new browser window on the site itself where you can do the question as you usually would. I choose not to implement the answering logic in the gadget itself because that would make things much more complicated, and I need people to go to the site to answer questions otherwise I loose all statistics and tracking of answer questions.

There is a very nice tutorial on creating Google Gadgets here:
http://www.seoish.com/how-to-make-google-gadgets/
I especially like the interactive part where you add gadgets with video explanation next to the Google Gadget editor. Google Gadgets are nothing more than xml files that describe the gadget's properties and logic. The logic can either be written in javascript, or redirected to another URL, and that last option is what I've done. It saves me the trouble of having to rewrite everything in javascript, but especially allows for people that are logged in to keep their credentials via the normal way. There is more detail on Google's Code site on creating and publishing gadgets.

This is the first of what I hope will be many ways to open up the site to the rest of the web. About2findout.com was never meant to be a locked database. After the screens, I've implemented a module to randomly generate 20 questions every minute. It's that module that feeds the Google Gadget and any other way of sharing I'll add in the future. It keeps the calculations on the site down (although I don't know how this behaves under heavy traffic), and avoids bots to suck out all questions and answers from the site. There are only 20 questions per minute. Should be enough for the real people among us.

To check out the Gadget or add it to your page:
Add to iGoogle
Add to webpage

Labels: , ,


Comments: Een reactie plaatsen

Links to this post:

Een koppeling maken



<< Home