Sign In/My Account | View Cart  
advertisement

Article:
 REST Roundup
Subject: Question on "no query" REST Post
Date: 2002-05-10 05:34:37
From: Sean McRae

Regarding Paul Prescod's post to Francis Norton (snippet pasted below for reference) this example seems to advocate that one effectively name every "meaningful" query so that the consumer of the service need not have to construct one on their own. Is this a characteristic of REST in general or just a solution for this particular problem domain?


Regards.


- Sean



-------- Original Message --------
Subject: Re: [xml-dev] SOAP and the Web
Date: Thu, 02 May 2002 04:27:10 -0700
From: Paul Prescod <paul@p...>
To: Francis Norton <francis@r...>
CC: xml-dev <xml-dev@l...>
References: <2C61CCE8A870D211A523080009B94E430752B3C9@H...>
<3CD01C16.80606@r...> <3CD06157.11DC0617@p...>
<3CD113B5.9060505@r...>


Francis Norton wrote:
>
>...
> I know I have a bit of a blind-spot here. What is the canonical example
> of a "resource" v. a "representation"? Say I wanted to look up trains
> from London to North Berwick - is the URL of the query a representation
> of the timetable resource?


The timetable is a resource. A URL is never a representation: the
representation is the stuff that gets sent across the wire: the XML or
XHTML or whatever. It is what you GET and PUT.


Here's the radical bit: ideally there would be *no* query in this
system. Let's say the XML was organized like this:


<routes>
<route from="http://train.com/cities/London"
to="http://trains.com/cities/NorthBerwick"
href="http://trains.com/routes/LondonToNorthBerwick"/>


</routes>


Then you have the document:
http://trains.com/routes/LondonToNorthBerwick


It has:


<times>
<time>ISODATE1</time>
<time>ISODATE2</time>
<time>ISODATE3</time>
<time>ISODATE4</time>
<time>ISODATE5</time>
</times>
"


No Previous Message Previous Message   Next Message Next Message


Sponsored By: