Re: Why GET is an application semantic

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 UTC