As you may have read, iGoogle also plans on supporting OpenSocial. Currently, the iGoogle sandbox does allow developers to test social applications. However, OpenSocial support in the production version of iGoogle will not come until later this fall.
Developers interested in creating canvas views should therefore pay close attention to the following four topics:
- How to determine which API calls to use
- How to store user data
- How to ensure cross-browser compatibility
- How to test gadgets in production
Note - please also read the following before beginning to design/code your gadget: |
1) Determining which API calls to use
The production version of iGoogle supports the "legacy" or original version of the gadget specification with just a few additions. For the most part, these are features named like _IG_functionName. Exceptions include the new views functionality and classes like com.google.gadgets.analytics that aren't part of the core API.
Gadgets can store user data and user preferences via UserPrefs, and should not use OpenSocial app data requests. Further, preferences which are used to store user data should have the datatype attribute set to "hidden." These preferences can be accessed programatically by creating a new _IG_Prefs object, and using the get and set methods. For more details see the developer's guide section on saving state.
In order for a gadget to be well received by iGoogle's audience, it should support major browsers. Pay particular attention to:
Some of the top issues with quirks mode in IE are:
Details coming shortly…
For additional background information on developing gadgets for iGoogle, check out the following resources:
Only the following sets of functions are supported in production. If a function does not appear on this list, you should not use it, or your gadget will not work in production.
- Core and feature-specific iGoogle legacy JavaScript libraries
- Views, which includes only the following classes and methods:
- gadgets.views
- gadgets.views.bind
- gadgets.views.getCurrentView
- gadgets.views.getParams
- gadgets.views.getSupportedViews
- gadgets.views.requestNavigateTo
- gadgets.views.View
- gadgets.views.View.bind
- gadgets.views.View.getName
- gadgets.views.View.getUrlTemplate
- gadgets.views.View.isOnlyVisibleGadget
- gadgets.views.ViewType
2) How to store user data
Gadgets can store user data and user preferences via UserPrefs, and should not use OpenSocial app data requests. Further, preferences which are used to store user data should have the datatype attribute set to "hidden." These preferences can be accessed programatically by creating a new _IG_Prefs object, and using the get and set methods. For more details see the developer's guide section on saving state.
In order for a gadget to be well received by iGoogle's audience, it should support major browsers. Pay particular attention to:
- IE 6/7/8
- Firefox 2/3
- Safari 2/3
Some of the top issues with quirks mode in IE are:
- Discrepancies in the box model — particularly margins and padding, and centering
- White space can have an effect on display of elements in a page
- Lack of support for certain CSS properties (max-width, max-height, etc.) except in standards mode
Details coming shortly…