IMO, there's a big difference between an interface with just one
generic operation and the uniform interface of REST - and it's not
just "one" vs. "four" (or whatever number), but a difference in quality.
Compare an OO interface like this
interface Shape {
float calculateSurface()
void rotate(float degrees)
void move(Position newPosition)
}
with one like this
interface Thing {
Object doSomething(Object o)
}
or, if you prefer,
interface Thing {
XMLDocument doSomethingWithAngleBrackets(XMLDocument x)
}
In the Shape case, there's a large number of useful things I can
build that take a "Shape" object, or a collection of Shape objects,
simply because this interface has semantics (which are hopefully
described somewhere). To do Rectangle or Ellipse-specific things, I
need to know more about my Shape; but still, this doesn't invalidate
the usefulness of the Shape interface.
The same isn't true for the Thing interface(s).
If you actually wrote down the "Resource" interface (as I've tried to
visualize it here: http://www.innoq.com/blog/st/2006/06/30/
rest_vs_soap_oh_no_not_again.html), you'd end up with a *huge*
contract, including standard response codes, a "getGloballyUniqueID
()" method, support for redirecting ...
(That's why I believe the arguments trying to position REST (or
rather: RESTful HTTP) as a sort of small-scale, non-enterprise ready
alternative to WS-* ar misguided -- it actually offers more, not less
capabilities than WS-*. )
Stefan
--
Stefan Tilkov, http://www.innoq.com/blog/st/
On Feb 27, 2007, at 4:16 PM, Gregg Wonderly wrote:
> Jan Algermissen wrote:
> > Gregg,
> > > Jan seemed to give up on the last go round.
> > Could you please put statements like this into context (as I do not
> > agree with you on the Invoke issue).
> >
> > When/How did I give up? And what does that mean?
>
> I am probably doing a bad job of stimulating healthy counter
> examples to my
> assertion that RMI "invoke" is a uniform API. My arguments about
> "invoke" are
> attempts at getting you and other RESTarians to help me understand
> through
> counter examples why invoke is not "a uniform API".
>
> The arguments have seemed pretty abrasive and I'm not sure how to
> continue.
>
> Gregg Wonderly
>
>