Actually, my preferred approach would be

http://www.frood.com/customers/1
http://www.frood.com/customers/2

(supporting GET and PUT) and

http://www.frood.com/customers/

returning a list of customers (on GET) and accepting new customers via POST.

Stefan
--
Stefan Tilkov, http://www.innoq.com/blog/st/




On Nov 30, 2006, at 6:51 PM, Steve Jones wrote:

So as a follow-up question ( I'm learning something today!) . Would
the prefered approach be

http://www.frood.com/customer1
http://www.frood.com/customer2

or

http://www.frood.com/customer?customerId=1
http://www.frood.com/customer?customerId=2

Or are both considered the same? The former could be quickly created
from a URI re-write of the latter of course, but I'm just wondering
what was the difference, I'll be honest the REST bit I'm writing at
the moment is using the later approach, so it would be good to know if
it isn't REST.

Steve

On 30/11/06, Stefan Tilkov <[EMAIL PROTECTED]> wrote:
> On Nov 30, 2006, at 8:03 AM, Steve Jones wrote:
>
> > So "graph" isn't a resource? But "GraphId452354" would be? I have to > > say in my reading of REST so far its the former that I've understood > > (and sometimes liked) while the later would just be rubbish as you'd > > have one resource per object instance (i.e. you are arguing that REST > > is on objects, my reading of the subject was that it was on classes).
>
> That's the misunderstanding, then: REST indeed uses URIs (at least in
> general and conceptually) to identify objects (instances), not
> classes, via URIs.
>
> For example, if your "application" (to avoid the term service)
> manages customers, you'd very likely have a distinct URI for every
> customer (in REST) as opposed to a single endpoint for the
> CustomerManagementService (which is the common WSDL/SOAL/WS-* approach).
>
> Stefan
> --
> Stefan Tilkov, http://www.innoq.com/blog/st/
>
>
>
>
>
>
>
>



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to