Hi Laura, One of the major differences between user pref and appdata is, user pref participated in the gadget rendering stage, yet appdata doesn't.
For example, the user may set his favorite fruit to banana, while the default value is apple. Then: - if the user set userpref: fav_fruit = "banana", then in the rendering stage, this value will be set and user will see a banana pic when gadget is rendered. - if the user set appdata.fav_fruit = "banana", user will see an apple pic first, then in your code there will be some routine to read the appdata fields, and replace the apple pic with banana one. The implementation is different too. For user preference variables, it is set/get through the routines: - features/src/main/javascript/features/core.prefs/* - features/src/main/javascript/features/setprefs/* The userpref storage is separated with social data storages like profile/friends/activities. In the sample implementation, it's stored in user's browser cookie. The appdata is manipulated through the routines: [Java] - java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/AppDataService.java - java/social-api/src/main/java/org/apache/shindig/social/opensocial/service/AppDataHandler.java [PHP] - php/src/social/spi/AppDataService.php - php/src/social/service/AppDataHandler.php Typically, the app data is stored in the DB. One extra point is that the appdata is a good place to cache the intermediate result which might be time-consuming to calculate. A good related reading material is: http://code.google.com/events/io/2009/sessions/DesigningOpenSocialAppsSpeedScale.html The slides: http://dl.google.com/io/2009/pres/DesigningOpenSocialAppsForSpeedandScale.pdf, page 49-51. Hope it helps. Cheers, Jacky On Thu, May 13, 2010 at 7:32 AM, Laura Nathanson <[email protected]>wrote: > I've integrated parts of Shindig with my social networking site, but, I > haven't been able to grasp this from the documentation I've seen.. What's > the difference between prefs and app data? > > I've implemented app data for my site, and know that I'm supposed to go on > and provide prefs. But I'm not sure what that will do that app data doesn't > already... > -- Best Regards, Jacky Wang (Office) +86-10-6250-3316 (Mobile) +86-1381-0018-677 Kejian Building, Tsinghua Science Park Building 6 No.1 Zhongguancun East Road, Haidian District Beijing P.R.China 100084
