W3C home > Mailing lists > Public > www-ws-arch@w3.org > June 2002

Re: Why GET is an application semantic

From: Mark Baker <distobj@acm.org>
Date: Wed, 19 Jun 2002 16:56:55 -0400
To: Joseph Hui <Joseph.Hui@exodus.net>
Cc: www-ws-arch@w3.org
Message-ID: <20020619165655.O5337@www.markbaker.ca>

On Wed, Jun 19, 2002 at 01:38:02PM -0700, Joseph Hui wrote:
> I might, just to be perfectly explicit, 
> though there's no fundamental difference in 
>   
>     http://nasdaq.org/quotes/stock/sunw vs
>     http://nasdaq.org/get?what=quotes&type=stock&symbol=sunw

The difference, as you've described by the purpose of "get" there, is
that the former identifies a resource, while the latter identifies an
operation performed on a resource.

That's a pretty big difference.

> in terms of method invocation.  If GET is understood, then
> the method name is implicit in the former, and explicit in
> the latter.

Right.

>  The explicit approach allows for get1, get2, ...
> to overload the same GET, say: get1 for realtime quotes, which
> fetches data from a trading floor environment; get2 for delayed
> quotes, which routes data from some news organization; ...
> (Of course, the realtime/delayed options can be astracted into
> a parameter of a generic get method.)

Why wouldn't

  http://nasdaq.org/quotes/stock/sunw/realtime

suffice for identifying a realtime quote?  Why do you need "get1"
or "get2"?

> Actually, the most salient difference between the two (URIs)
> lies in the form of parameter passing.  The former uses positional
> parameters; the latter uses named parameters, to allow for superior
> flexibility in situations where a caller only concerns itself
> with few options out of many, e.g. to get a currency-exchange quote:
> 
>    http://nasdaq.org/get?what=quotes&type=currencyexchange&curr1=USD&curr2=EUR

Sorry, I don't understand.  I see putting the method in the URI as
confusing roles.  A URI identifies a resource - something with state
and identity, like an object.

MB
-- 
Mark Baker, CTO, Idokorro Mobile (formerly Planetfred)
Ottawa, Ontario, CANADA.               distobj@acm.org
http://www.markbaker.ca        http://www.idokorro.com
Received on Wednesday, 19 June 2002 16:46:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 July 2007 12:25:00 GMT