Loading ...
Sorry, an error occurred while loading the content.

5840Re: [rest-discuss] RESTful representation of nouns?

Expand Messages
  • Dr. Ernie Prabhakar
    Apr 5, 2006
    • 0 Attachment
      Hi everybody,

      On Apr 5, 2006, at 7:05 PM, Mark Baker wrote:
      > The whole verb-in-the-URI-thing is just a rule of thumb that I found
      > seemed to help some brought-up-on-RPC types I know to convert to a
      > state transfer style.

      Thanks for all the comments, they all helped add a little bit of
      clue, including this:

      > Places are nouns, too. All you are doing is giving the URI of a
      > service
      > that performs stateless conversions. The GET interface simply
      > tells you
      > how to use the service (e.g., HTML form), there is no other resource
      > involved, and there is no sustained benefit across multiple
      > invocations
      > (no reusable resources other than the service itself).
      >
      > I hate to quote myself, but in sec 5.2.1.2:
      >
      > "REST components perform actions on a resource by using a
      > representation to capture the current or intended state of that
      > resource and transferring that representation between components."
      >
      > so what you have defined above is a one-resource RESTful service that
      > merely reflects a different shade of state back to the client.
      >

      So, services (even those that look like verbs) can be stateless
      resources, too, as long as they aren't implicitly masking -other-
      resources?

      >> http://myhost.com/convert?format=pdf&uri=http//example.com/
      >> get_it_here.html
      >>
      >
      > That's a different beast -- it is a gateway, and it would "look"
      > more RESTful simply by choosing a different URI syntax, e.g.
      >
      > http://myconverter.com/pdf/http://example.com/get_it_here.html

      Ah, I get it. If, for example, it always returned the result as:

      http://myhost.com/convert?result.html

      That would be non-RESTful (er, unprincipled? :-), because it doesn't
      actually create real resource.

      > It talks about resources, as in
      > *re*sources, because that is what we want from a distributed
      > hypermedia system (the ability to reuse those information sources
      > through the provision of links). Services that are merely end-points
      > are allowed within that model, but they aren't very interesting
      > because they only amount to one resource. The really interesting
      > services provide many resources.
      >

      Okay, that actually makes sense. I now officially have at least one
      more clue than I did before...

      Thanks!

      -- Ernie P.
    • Show all 12 messages in this topic