I’ve been playing around with Google gadgets over the last day and a half. Overall, the experience has been fine. Writing the actual gadget is basically a mix of html and javascript. They provide helper methods to grab feeds, xml, or just html content. To go along with this experiment, I had to write a public api for Property Center. The api is still very much a work in progress, so I’m not going to officially announce it, as it will likely change in the coming days/weeks. I’ll mention that I chose not to go the wsdl/asmx route and instead opted to use straight http requests. I feel this gives the most flexibility to support languages outside of .net. It also allows me to support REST requests in the future with little modification to the api.
The one thing that I did find is that the google gadget api in IE doesn’t like xml documents with encodings other than utf-8. In my api code, I was using an XmlWriter object to write to a StringBuilder. I found out that in this configuration, the xmlwriter will ignore the encoding type, opting always for utf-16. So… I modified my code slightly to use the response stream instead and things are kosher now. I believe that it’s a bug with Google Gadgets (not reading encodings other than utf-8) and a bug with Microsoft (not following the specified encoding with XmlWriter and StringBuilder objects).
You can check out the Property Center gadgets by clicking here.