There's a difference between service polymorphism and a uniform interface.

REST has a uniform interface, but it's not polymorphic.
If you request a GET on a resource, you will always get the resource
representation.
If you request a PUT on a resource, you will always replace the
resource representation.
If you request a POST on a resource, you will always post new
information to the resource.
If you request a DELETE on a resource, you will always delete the
resouce representation.

Each resource might exhibit slightly different behavior, but the
behavior of a particular resource (identified by its URI) should not
change.

Now -- if you are tunneling an RPC through a POST, then you can
implement support for polymorphism -- requesting a variety of
operations based on the type or content of information being posted --
but then you are violating REST principles.

Anne

On 9/10/06, Steve Jones <[EMAIL PROTECTED]> wrote:
>
> On 10/09/06, Gregg Wonderly <[EMAIL PROTECTED]> wrote:
>  >
>  > Steve Jones wrote:
>  >  >
>  >  > What do you mean by a polymorphic service? One that can handle
>  >  > multiple message types, or one that is polymorphic in terms of the
>  >  > contract it offers to consumers.
>  >  >
>  >  > If its the former then I don't see why not, if the service is
>  >  > something like "DataCleansing" and you can pass in multiple different
>  >  > data types for cleansing and it returns the cleansed data.
>  >  >
>  >  > If its the later then I think it might get a little tricky if the
>  >  > service changes its behaviour based on what it is passed!
>  >
>  >
>  >  Isn't this what REST does?
>  >
>
>
>  Oh boy, REST claims polymorphism.  I thought REST stressed the
>  importance of the URI? Which was resource specific?  This puts it in
>  the first case (which WS can certainly do as well) rather than the
>  later (which WS and REST can both do but I don't think its a bad
>  idea).
>
>  Its what lots of MOM systems used to do, and was one of the reasons
>  they got complex as you had lots of individual message types that the
>  broker in the middle determined what should be done where, so the
>  whole MOM was ineffect polymorphic based on message type.
>
>
>
>                   





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/service-orientated-architecture/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to