www.nickhodge.com

microsoft, munging and on being a mercurial iconoclastic professional geek.

Gadget Geek Journey; Desintation 1: live.com

with one comment

Time to get ser­i­ous on my res­ol­u­tions. Well, at least one any­way; I’ll start the waist shrinking/walking later. It’s Thursday Geekout time!

Inspired by Robert Scoble’s Podtech.net live.com gad­get post­ing, and a gen­eral feel­ing that gad­gets are where it is at for non-professional pro­gram­mers like myself.

So, first port-of-call http://gallery.live.com/ then on to the Developer cen­ter

Decision time: what to gad­get up? A Cricket gad­get is under­way. I am sure that one of the vari­ous national reli­gions of foot­ball will fol­low come March. For weather I can use my real win­dow to look out­side. (note: grow­ing up on a farm, you learn to read the weather by look­ing through the win­dow at the clouds). Neil Finn Lyr­ics!

So, there is some magic back-end code that is pulling the data from a small data­base, and ren­der­ing text smartly onto a ran­dom Neil Finn image. This will be the first step. No need to con­fuse myself with too much shenanigans just yet.

Off to the Developer’s Guide, and down­load the examples from the .zip. Oooh, css xml javas­cript. Easy. I have a loc­al­host web server run­ning, so that’s no stress. Text editor open, cod­ing music in the ears.

How to test out the gad­get? OK, I need Microsoft Visual Web Developer 2005. Now is a good time as any to test it out. There is a method of har­ness­ing your local gad­get to Inter­net Explorer and the live.com serv­ers to test out before embar­rass­ing your­self pub­licly! Hmm, seems like you can dir­ectly access the test har­ness with the cor­rectly formed URL. There are three ver­sions of this URL that I can find.

OK, it seems that the live.com gad­get test­ing Javas­cript har­nesses, Inter­net Explorer 7 and cross-site script­ing are in the midst of a con­spir­acy to stop test­ing. Time to hit the pro­duc­tion serv­ers with the code.

This post­ing on the new Gad­gets for­ums helps: just go straight into live.com, cross your fingers!

Works first time! After an hour of clean­ing up and renam­ing things as per the recom­mend­a­tions, here it is:

Click: live.com Neil Finn Lyric Gadget

Fur­ther com­ment live.com gad­gets are simple to cre­ate. XML file mani­fest, or list of what’s import­ant; a CSS file to style your con­tent and the Javas­cript. This Javas­cript con­tains the logic of your gad­get which is essen­tially insert­ing HTML into the stream. It can gather text extern­ally to gen­er­ate this HTML into some­thing more inter­est­ing than a picture.

Written by Nick Hodge

January 4th, 2007 at 3:28 pm