--- In [email protected], Dennis
Sosnoski <[EMAIL PROTECTED]> wrote:
>
> Anne Thomas Manes wrote:
> > ...
> > Let's say for example you have a service that manages information
> > about people. A service-specific interface would expose interfaces
> > like:
> >
> >        person getPersonByName("anne")
> >
> >        person[] getPeopleByAge("29")
> >
> > and a service-specific POX representation of these methods would be
> > something like:
> >
> >        GET http://example.org/getPersonByName?name=anne
> >        GET http://example.org/getPeopleByAge?age=29
> >
> > A RESTful interface would be more like this:
> >
> >        GET http://example.org/people/anne
> >        GET http://example.org/people?age=29
> >
> > Note that to truly exploit the power of REST (and in particular, the
> > "hypermedia as the engine of state" constraint), the response to the
> > query by age should return a list of URIs for the people matching the
> > query (each person is a resource with its own URI).
> >   
> 
> Does everyone agree on this last point? It seems like that's going to 
> make for a lot of separate requests in order to get actual information 
> (since the GET http://example.org/people?age=29 result is a list of
URIs).
> 
>  From the performance standpoint, it's generally going to be much more 
> efficient to allow the result to provide the full data for the people 
> matched (which would include the URI for each person as a standalone 
> entity). What do the REST advocates think is appropriate for a case
like 
> this - allow a response which includes a set of resources, or require 
> each resource to be accessed directly and damn the cost?

I'd love to know what people think of this as well. In my application
(http://www.frevvo.com/blog/?p=26), I have forms that edit multiple
[XML] documents. When the form is submitted, I generate a document
set, which has a URI.

For performance (and other) reasons, I've compromised as follows:
If you access the URI, you get the entire document set.
If you access the URI with ?output-type=uri-list, you get the list of
individual document URIs.

The thinking is that you specify the desired representation of the
document set resource. Sounds reasonable?

Thx,
-Ashish

-----
Ashish Deshpande
Founder, frevvo LLC.; http://www.frevvo.com
frevvo Blog: http://www.frevvo.com/blog


Reply via email to