It’s just data

Etymology

Anne Thomas Manes: Notice that the URL contains a method name (getInfo) and query string containing the method parameters. This is NOT REST!

I take it that Google Search doesn’t meet the Burton group’s (re-)definition of the term REST.  Nor would most things that uses an HTML form comply, as this results in either a query string or a POST.

It is statements like the one I quoted above that tempers my enthusiasm when I hear that Burton sees the future of SOA and it is REST.  Until we can agree on what the term REST means, we’re just replacing one meaningless buzzword with another.

My take: if an operation is read-only (as in no state transfers), then that operation is RESTful, no matter whether or not there is a ? in the URI or if the request uses POST.  Avoiding ?’s in URIs and POST for read-only operations are certainly best practices, and furthermore putting method names in URIs is often an indicator of RPC-think, but none of the above are absolute disqualifiers.

Meanwhile, InfoQ has posted Leonard and my first interview on our (virtual) book tour where we presciently talk about “becoming quite fashionable to layer a thin veneer of REST-like interfaces over top of an already many layered framework” and “cargo cult REST”.


Do you think this URI smells RESTful?

Sam picks up on Anne: Notice that the URL contains a method name (getInfo) and query string containing the method parameters. This is NOT REST! This tallies with one of my current pet peeves, people who think you can look at a URI and say anything...

Excerpt from Paul Downey at

Sam Ruby's definition of REST

Sam Ruby writes on the ‘wrong’ usage of HTTP methods and request parameters in RESTful services: if an operation is read-only (as in no state transfers), then that operation is RESTful, no matter whether or not there is a ? in the URI or if the...

Excerpt from blog.bookworm.at at

+1.  I’ve referred to this as being accidentally RESTful.

Posted by Mark Baker at

The rash of people suddenly “getting” REST makes my teeth itch... ;-) 

I believe Ms. Manes herself was, last year, calling REST an implementation detail, IIRC.

Looking forward to the book, by the way, Sam.  It’s the first tech book I’ve heard about recently that I’ve actually thought about digging into the cavernous emptiness of my wallet.... ;-)

Posted by Jason R Briggs at

What the URIs look like is absolutely irrelevant to whether an app follows the REST style or not. What matters is whether the client needs a priori knowledge of the server URI space: if it does, then you have nothing more than RPC; if it does not, because it can discover any relevant resources by following links, then the app is RESTful. Hypermedia as the engine of application state.

Forms do not contradict this at all: the client does not need a priori knowledge of the server URI space, because it retrieves a description of (a subset of) that URI at runtime and from the server. I can change the URI in <form action> and modify the parameter names at any point, and clients will immediately start requesting the new URI instead of the old one, without the client code having to change at all – this is what REST is about. Hypermedia as the engine of application state.

This is the inherent contradiction in understanding REST: the “hypermedia as the engine of application state” constraint is so simple (and dead obvious, once you get it) that it’s hard for people to understand. It only recently fully clicked for me.

Posted by Aristotle Pagaltzis at

Avoiding ?’s in URIs and

Don’t understand why this is a best practice. I know it used to impact caching. Is that still true?

POST for read-only operations are certainly best practices,

Makes sense to use GET when you can, sure.

and furthermore putting method names in URIs is often an indicator of RPC-think, but none of the above are absolute disqualifiers.

I think this last point is what Anne had in mind.

Bandwagon? Definitely.

Posted by Robert Sayre at

Off topic: Been reading the book. Absolutely the best tech book I’ve read in many years.

Posted by Lawrence Krubner at

Avoiding ?’s in URIs and

Don’t understand why this is a best practice. I know it used to impact caching. Is that still true?

It is a debating style.  When you have a point to make, concede more than you have to.  Technorati is an example of a well thought out query URI, but Google’s equivalent is both functional and RESTful.  Paul Downey expresses it well: What’s more I don’t need to know if the publisher happens to think of it as a method invocation because as soon as they give me a URI, it becomes a resource.

and furthermore putting method names in URIs is often an indicator of RPC-think, but none of the above are absolute disqualifiers.

I think this last point is what Anne had in mind.

Here’s what she said: This is NOT REST!.

Posted by Sam Ruby at

Here’s what she said: This is NOT REST!.

I see. If we want to avoid this kind of thing, someone will need to provide the analyst folks with some marketing material. A book is too big ;), so maybe a PDF. It should probably start with the “EAI The Hard Way” slide from the waka powerpoint.

Posted by Robert Sayre at

Ideally, a year from now everyone with an opinion on Rest will have read the book. You tackle this issue early on, in a footnote. From page 13:

“<i>Now, lots of architectures are technically RESTful*, but I want to focus on the architectures that are best for web services. So when I talk about RESTful web services, I mean services that look like the web...

Posted by Lawrence Krubner at

I mean services that look like the web

The important way that that particular service does not (likely) look like the web, and Google’s search does, is that the notion of “web-ness” implies a certain amount of interconnectedness, as in hypertext links.

Unless the response contains URIs of other resources, these set of services are points.  Disconnected, isolated, independent, points.

If the style of programming that such independent services encourages is “import this WSDL, and the runtime will construct service requests using the (non-URI) parameters that you specify”, then that style of interaction is simply RPC, no matter what the binding in the WSDL may happen to say.

That’s what should be in the marketing material for analysts.

Posted by Sam Ruby at

Sam Ruby: Etymology

[link]...

Excerpt from del.icio.us/zhangyining/rest+2read at

It’s more of a continuum than a yes/no question.

A more helpful way to phrase it is “how much benefit does this get from REST and the leverage that the Web gives me?” If you use POST, you lose caching, easy linking, etc. If you use queries, you lose some aspects of relative URIs. And so on.

I think that for the foreseeable future, “RESTful” is going to be a proxy for “leverages the Web well.” While technically anything using HTTP is RESTful — even POSTing SOAP envelopes over it — that’s not too helpful.

Posted by Mark Nottingham at

Implementing RESTful services

Anne has written an interesting blog about how NOT to do RESTful Web services. First of all, I think Anne’s missing a key characteristic of REST in your list of rules: Hypermedia as the engine of application state. Basically, that translates to...

Excerpt from Sanjiva Weerawarana's Blog at

Aristotle Pagaltzis comment on Sam Ruby's Etymology piece

[link]...

Excerpt from del.icio.us/lsdr at

Google Base Data API vs. Astoria: Two Approaches to SQL-like Queries in a RESTfu

... [more]

Trackback from Dare Obasanjo aka Carnage4Life

at

Add your comment