What exactly is an OpenSocial app?

0 views
Skip to first unread message

Jamey Wood

unread,
Aug 28, 2008, 1:43:18 PM8/28/08
to opensocial-an...@googlegroups.com
(Apologies to anyone who has already seen this; I first tried this question on the opensocial-api list, but got no response.)

What exactly is an "app" in OpenSocial terms? Is each unique gadget an
app? Or is each unqiue user-installed instance of a gadget an app?

Based on my reading of the documentation, I think it's the former. In
other words, if I have a gadget spec at "http://myhost.com/mygadget.xml"
and have installed two instances of this gadget in my profile page for
some OpenSocial container, each of those two instances will be treated
as the same app (and thus have the same AppData, etc). Correct?

If so, how could those two gadget instances be configured (in a standard
manner) to display different information? (For example, suppose the
gadget implements an RSS feed reader, and the user wants each of the two
instances to display the contents of different feeds.)

The OpenSocial 0.7 spec has this note which seems to speak to this (at
http://code.google.com/apis/opensocial/docs/0.7/spec.html#persistence):

Note: Version 0.7 of the OpenSocial API simplifies the Persistence APIs
by eliminating Global and Instance data. Per-application instance data can
be implemented on top of the per-user storage, and Global data can be
implemented simply by fetching a JSON or ATOM feed from a remote
server under the developer's control.

I do not understand how one can consistently implement such per-instance
appdata on top of the per-user app data? If each app instance had some
way to look up a consistent and unique instance ID for itself, then this
would make sense. But I am not aware of such a call in OpenSocial? Am
I overlooking something?

Thanks,
Jamey

Kevin Brown

unread,
Aug 28, 2008, 1:46:48 PM8/28/08
to opensocial-an...@googlegroups.com
On Thu, Aug 28, 2008 at 10:43 AM, Jamey Wood <Jamey...@sun.com> wrote:

(Apologies to anyone who has already seen this; I first tried this question on the opensocial-api list, but got no response.)

What exactly is an "app" in OpenSocial terms?  Is each unique gadget an
app?  Or is each unqiue user-installed instance of a gadget an app?

Based on my reading of the documentation, I think it's the former.  In
other words, if I have a gadget spec at "http://myhost.com/mygadget.xml"
and have installed two instances of this gadget in my profile page for
some OpenSocial container, each of those two instances will be treated
as the same app (and thus have the same AppData, etc).  Correct?

If so, how could those two gadget instances be configured (in a standard
manner) to display different information?  (For example, suppose the
gadget implements an RSS feed reader, and the user wants each of the two
instances to display the contents of different feeds.)

This is where the instance id / module id comes into play, which is still available via several mechanisms. 


The OpenSocial 0.7 spec has this note which seems to speak to this (at
http://code.google.com/apis/opensocial/docs/0.7/spec.html#persistence):

 Note: Version 0.7 of the OpenSocial API simplifies the Persistence APIs
 by eliminating Global and Instance data. Per-application instance data can
 be implemented on top of the per-user storage, and Global data can be
 implemented simply by fetching a JSON or ATOM feed from a remote
 server under the developer's control.

I do not understand how one can consistently implement such per-instance
appdata on top of the per-user app data?  If each app instance had some
way to look up a consistent and unique instance ID for itself, then this
would make sense.  But I am not aware of such a call in OpenSocial?  Am
I overlooking something?
Reply all
Reply to author
Forward
0 new messages