Friday, 23 January 2009

iGoogle's getting some changes under the hood

If you've had a chance to look at recent gadgets documentation, or tried out the iGoogle developer sandbox, you're probably aware that gadgets.* is the new hotness. Sadly, the _IG_* methods are all that work in production.

Starting within the next month, iGoogle will be undergoing some significant behind-the-scenes changes. The first recipients will be gadgets in open syndication, which will gain support for gadgets.*. We've worked hard to make sure gadgets work properly with the new architecture, and gadgets that use _IG_* methods should still function properly. However, there are two things that you, as a developer, should note.

First, support for datatype=location is now deprecated, and you should use another method, such as the Google Maps API geocoder, for positional data.

Second, iGoogle will dynamically rewrite some HTML and JavaScript for faster loading and rendering times. While this is generally a good thing, some malformed HTML and JavaScript can cause problems. Make sure to wrap your JavaScript code as demonstrated by the following example to avoid many common issues:

<script type="text/javascript">
// js code goes here...
// -->
As always, if you have issues, let us know in the iGoogle Developer Forum.

Wednesday, 14 January 2009

New ACLs on social features

Up until today, gadgets installed in the iGoogle developer sandbox had implicit access to social data, with no way for users to opt-out without uninstalling the gadget. We've added a feature to give more finely-grained control to users and allow users to explicitly grant or deny access to social data to their gadgets.

When users install gadgets that use social data (indicated by requiring the OpenSocial feature), they will be prompted to give permission to access social data. If a gadget is released without social features and is upgraded, users will be prompted for access within the gadget when the new version is first rendered.

When OpenSocial gadgets are available to all iGoogle users, users must grant permission before gadgets are allowed access to social data. For sandbox users, we want to ease development, so sandbox gadgets are allowed access to social data before confirmation.

Developers, this is important, so take note. If users deny access to social data, the gadget should have a good error message and graceful fallback UI.

Check for the ability to access social data with this snippet of code:


and fall back gracefully if permission is not granted.

If you have any questions, please join us in the iGoogle Developer Forum.