Re: issue 85 - range unit extensions

Kris Zyp wrote:
> 
> I was referred to this discussion since it sounds like there 
> consideration for deprecating alternate range units. I just wanted to 

I'd say "either to repair or to deprecate them".

> let the group know that Dojo is currently using an range unit "items" 
> for doing paged requests with it's JSON REST client. The HTTP 
> specification makes it sound like this is the most appropriate technique 
> for doing paged/range requests (and the byte unit will not do, it would 
> result in invalid JSON). I believe we are doing something similar to 
> what is mentioned in the referenced 
> article: http://msdn.microsoft.com/en-us/magazine/cc301869.aspx (we 
> could change to "rows" if desired).

No, please don't do that :-).

> When Dojo wants to have paged set of JSON objects (used in the Dojo 
> Grid) it will create a request like:
> GET /Customer/
> Range: items=-19
>  
> And expects servers that are aware of the "items" range unit to respond 
> with something like:
> GET /Customer/
> Content-Range: items 0-19/244
> [{name:"item one"},{....

Looks good to me.

Out of curiosity: did you consider simply using a query parameter 
instead? If you did, and decided not to, that would be interesting for 
the question whether custom ranges are a good idea after all.

BR, Julian

Received on Sunday, 31 August 2008 11:40:38 UTC