> > - AppData: persistent application data storage, used to store small and
> > simple things like highscores of games, etc
>
> Hummmm this is a little cloudy.
> What am I expected to do about this one, at server level?
>

It's a storage for gadgets to use, max size of it (per user+gadget combo) is
quite limited though, 2k or so on orkut.com for instance. See the opensocial
docs for reference:
http://code.google.com/apis/opensocial/docs/0.7/spec.html#persistence

(thats often a good place to learn about the general concepts & the spec;
Fortunately the spec is pretty well documented, as is the gadget development
side of things, it's just shindig that's lacking docs :P)

The php equiv of such a storage would be your $_SESSION data for instance :)


> Each class has a few functions defined, and the return values are not
> > documented, but the 2 examples (jsondb one and partuza's) are your guide
> > here,
>
> What is JasonDB?
>


JSON DB, not jason :) See:

http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php

it's an example data back-end implementation using a simple plain text file
(with the data encoded in json format, hence the json db name), it's not at
all something you'd use for anything other then a quick-and-dirty-demo, but
it's the example we ship.

OK. The first two you gave me were easy. The AppData one... I am still a
> little confused about.
>

See description above :)


> OK. Just to make sure: the only difference between the views "profile" and
> "canvas" is in their sizes?
>

One is the size (like when you go to someone's profile on orkut he'll have 3
small applications there, thats their profile views), but when you click on
a link to choose your favorite songs in the iLike application, you go to a
full screen mode of that app, and only that app is shown, that's the canvas
view.

Another example, in the 'emote' gadget the profile view would show a smily
graphic and "i'm feeling excited today!", where as the link "change your
mood" brings you to a full screen view of the gadget where you can pick out
of hundreds of different smilies and enter the text you want to show.

So yea, size and if the page is dedicated to just one gadget or not is the
difference. (and the gadget iframe url has a view=<view name>, aka
view=canvas or view=profile)


> > and you will need to implement a few basic RPC services (gadget to
> > container
> > rpc through javascript that is), see partuza's container.js for example:
> >
> http://code.google.com/p/partuza/source/browse/trunk/html/js/container.js
>
>
> Sorry, I lost you here. Can you please explain this in very simple words?
> In particular, can you give me an example of this?
>
> <http://code.google.com/p/partuza/source/browse/trunk/html/js/container.js
> >Add
>

The linked javascript is the example of it :)

The container (the website) and the gadget often live on different domains
(especially on social network sites) since the cross domain policy provides
a solid protection against the gadget doing anything malicious with to
container.. so to communicate things like 'change my title' and 'resize my
height' there is a RPC service between the two to cross the cross domain
boundry.

So you want to implement these basic 4 functions in javascript, in a way
that will work in drupal:
gadgets.rpc.register('resize_iframe', this.setHeight);
gadgets.rpc.register('set_pref', this.setUserPref);
gadgets.rpc.register('set_title', this.setTitle);
gadgets.rpc.register('requestNavigateTo', this.requestNavigateTo);

(the first param being the rpc call name, the second being the function to
call when the gadget makes that request)


THANK YOU!


More then welcome of course! & please never hesitate to ask questions on the
list, we're friendly folk and always happy to help :)

  -- Chris

Reply via email to