I'd like to see a more radical simplification of the JS API -- a simple, SQL-like query language (OSQL?) that unifies the data access interface of appdata, people, and activities.
Think of appdata, people, and activities as three big tables of key-value pairs indexed by owner ids. All data requests will then boil down to a clean OSQL call.
For example, a "newPersonAppDataRequest" will translate to:var osql = new opensocial.query('SELECT owner, key FROM appdata WHERE owner IN group_id');
osql.execute(function(result) {
// result is an array of [owner id, appdata value]
});
Pagination can be supported by the "LIMIT ... OFFSET" syntax (e.g. "SELECT owner, key FROM appdata WHERE owner IN group_id ORDER BY owner LIMIT 20 OFFSET 40").
Similarly, we can update or remove appdata using queries like "UPDATE appdata SET key = value", "DELETE key1, key2 FROM appdata" with an implicit "WHERE owner = owner_id" clause.
Thoughts?
On this mod—can we piggy back some language indicating the minimum size of the AppData? I know that there has been concern over the paltry amount of space MySpace provides vs. the 10K that ShinDig provides. Language like ‘Containers SHOULD provide at least 10KB of space for AppData.’ would be enough to take care of another set of concerns.
It seems like we should deprecate opensocial.DataRequest.DataRequestFields instead of opensocial.DataRequest.DataRequestFields.ESCAPE_TYPE. Reason: the proposal deprecates the only field in the enum.
Is there a reason to keep the type alive?
From:
opensocial-an...@googlegroups.com
[mailto:opensocial-an...@googlegroups.com] On Behalf Of Lane
LiaBraaten
Sent: Friday, November 07, 2008 10:21 AM
To: opensocial-an...@googlegroups.com
Subject: [opensocial-and-gadgets-spec] Re: Proposal: Radically simplify
the Persistence/AppData API
+1 - and +1 on codereview.appspot.com!
+1
Total of 4 yes votes: (Arne, Evan, Lane, Me)