hi guys,
in my experience there are really 3 cases that are worth
distinguishing from a users perspective.
#1 - i want all the properties of a node in one response
#2 - i want all the childnodes of a node and their properties in one response
#3 - i want all the childnodes and properties at an infinite or
arbitrary level in
one response
i would argue that #1 & #2 make up 90% of all the requests.
#1 & #2 are not a big deal with respect to serverside caching since
they are usually very cheap.
so i would argue that with respect to caching we should probably take
care of the expensive #3...
personally, with ujax in mind, i certainly would argue that the default
behavior is important for a method like ujax.getContent("/mynode")
should be to just get the proprties of a node in a shallow manner.
which to me hints that this should probably also be the the default
behaviour of "/mynode.json" (== "/mynode.0.json").
to align with the webdav propfind "Depth" header i would recommend to go with
"/mynode.infinity.json"
regards,
david
On 1/9/08, Tobias Bocanegra <[EMAIL PROTECTED]> wrote:
> > > > Why not:
> > > >
> > > > /stuff.json?depth=1
> > > >
> > > > It's not like we need to use the URI mapping for everything.
> > > because this breaks caching.
> >
> > Really? I'm probably out of touch with current practice in HTTP
> > caching, but at least in theory there should be nothing in query
> > parameters that would prevent caching.
>
> but in real life. for example when a form input is used to display
> search results. so the content of the resulting page changes if the
> underlying search space changes. and since not all apps use proper
> cache prevention (like no-cache headers etc.) most proxies do not
> cache requests with a query (at least afaik).
>
> in any case, i find it a very good and simple differentiator (beside
> the common http headers) to decide whether to cache responses or not.
> and i would keep it this way in sling.
>
> regards, toby
> --
> -----------------------------------------< [EMAIL PROTECTED] >---
> Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> T +41 61 226 98 98, F +41 61 226 98 97
> -----------------------------------------------< http://www.day.com >---
>