Opensocial containers: check Google Gadget API compliance with gadget “IGCheck” (dev tool)

December 9, 2007 – 4:36 am

When Google launched the Opensocial initiative, it was clearly stated that the current status is beta. As a prooof, the current version of the API is 0.5.

The opensocial containers have to implement 2 APIs to be conform with this initiative:

As opensocial initiative specs are still beta and many partners are already and will get involved, I noticed very early on in my first experiences discrepancies between implementations on the various containers that I can already access (or at least their sandbox...) : igoogle itself, Google's Orkut, Hi5, Ning.

So, I decided to implement this Gadget IGCheck since those discrepancies have to get eliminated over time in order to reach the initial promise of Opensocial "Write Once, Run Anywhere".

The purpose of IGCheck is to test and report which functions of the Google Gadget API (i.e., prefixed with _IG_ in their Javascript name) are available in which containers. IGCheck then produces a report comparing the current test with reference data.

To get current status, check this page to see the most current result that we can produce concerning igoogle, orkut, hi5 & ning.

As the number of opensocial partners that are open for tests remain limited as of now, the following conclusions can be drawn as of now :

  • Orkut uses the gmodules infrastructure of Google Gadgets to run the opensocial api (see the line "host" in the result array)
  • Hi5 does the same and as such seems to have "outsourced" the task of running its opensocial container to Google (see the line "host" in the result array)
  • Ning has followed a more independent approach by implementing a fully independent container named "proxy.ning.com" (see the line "host" in the result array)
  • The choice of Ning has currently drawbacks: IGCheck finds only 6 _IG_ functions whereas 55 are present in the others. (see the line "count" in the result array)
  • Ning seems to have created its own function(s) with _IG_Prefix: a function "G_Tabs" is present in the Ning container but nowhere else(see the line "_IG_Tabs" in the result array).

The conclusions above are preliminary results only:

  • the current and future containers will have to converge after the current pioneering phase in order to reach the promise "Write Once, Run Anywhere" although the fact that IGCheck itself is a proof of partial achievement (IGCheck source code is unique for all containers)
  • the opensocial initiative will have to get more precise on Google Gadget API requirements: the debate on this topic is currently hot on the opensocial discussion group as nothing (at least to my knowledge...) has been clearly and officially stated in this area until now . A poll is under way. The target is to get opinions of developpers and eventually to define to which extent opensocial containers have to implement the _IG_ API.

To use IGCheck in the above container, please use http://www.toojoor.com/opensocial/js/google/gadget/ig-check.xml as URL for application / gadget in the appropriate box on your social network of choice.

Stay tuned (via RSS also): more result to come when we can access more containers....

If you want to reproduce my tests and don't know how to access, read my 2 tutorials for Orkut & Hi5. The one about Ning will follow shortly.

PS: if you now of other containers that are open for test, please, let us know!

Tags: , , , , , , ,

  1. 8 Responses to “Opensocial containers: check Google Gadget API compliance with gadget “IGCheck” (dev tool)”

  2. Wow thanks Didier this is excellent!
    The OpenSocial standard now has its first test suite thanks to you.
    Keep up testing these containers as the specification evolves.

    P@

    By Patrick Chanezon on Dec 9, 2007

  3. A minor issue is the alternative between _IG_ and jquery. The implementation reference for a container is using a jquery call to fetch the gadget XML. As the reference does not use iframes, the tools from jquery.js are also reachable from the gadget. So anyone using the implementation reference will probably be able to incorporate jquery. Should the availability of this library be assumed too? And if so, should it be incorporated as a Requires: tag in the gadget XML?

    By Alejandro Rivero on Dec 11, 2007

  4. @Alexandro: can you point to which “implementation reference” you think of? Then, I’ll give you my thoughts on this.

    By Didier on Dec 11, 2007

  5. Didier, the point is that the comments in the Sample Container example say that it is also being developed as a serverless testbed for gadgets.

    code.google.com/p/opensocial-container-sample/downloads/list

    See
    opensocial-container-sample.googlecode.com/svn/trunk/samplecontainer.js

    where it is stated
    * This container serves two purposes.
    * (a) To demonstrate how a container can be implemented using a simple
    * example.
    * (b) To create an environment for easy gadget testing. OpenSocial is all
    * about social APIs, which means that gadget testing usually involves
    * multiple user accounts. This container makes testing easy by letting
    * gadgets specify arbitrary state for any number of users.
    */

    So if it is used for goal (b), it will become a reference implementation.

    By Alejandro Rivero on Dec 11, 2007

  6. Alejandro,

    I read the code from the sample container. Now, I understand your question: i discovered the inclusion of jquery.js in samplecontainer.html.

    My understanding is that no such library (jquery, prototype, etc…) is part of the standard. So, you can definitely not rely on its presence in a productive environment.

    But, what you can do is just include it to be sure that it’s then present.

    See what I did in http://www.toojoor.com/opensocial/js/google/gadget/ig-check.xml. I start by including the prototype.js library and it works just fine.

    Then, I am sure that it’s present
    regards
    didier

    By didier on Dec 11, 2007

  1. 3 Trackback(s)

  2. Dec 10, 2007: Javascript News » Blog Archive » OpenSocial Container Checker: IGCheck
  3. Dec 11, 2007: Toojoor » Blog Archive » How to identify the current opensocial container
  4. Dec 14, 2007: Toojoor » Blog Archive » Shindig: official list of _IG_ functions not defined yet

Post a Comment