Rant: That’s Not Rest.

I’ve asked for an explanation, definition, blog post, book, or any other source of material that can get me up to speed on REST in web development a number of times. It’s a popular subject these days, and there seems to be an abundance of knowledge and information out there.

Except that it’s all wrong. Every last bit of it.

… or, at least the handful of people who inevitably respond with comments like “no one does REST correctly” and “that’s not REST” would have me believe.

Your Doing It Wrong

Frankly, I’m tired of this pedantic, obnoxious response. The same people that continuously say “no one does it right” can’t seem to tell me why it’s wrong or point me to a resource that does do it right.

ThatsNotREST

Here’s the deal. If everyone does it wrong, then write a blog post or a book or a screencast or something that tells the world how to do it right. Until you can point people to what REST actually is, stop telling everyone that no one does REST right.

My Journey Into Being Wrong

I have work to do. I’m obviously going to do it wrong, but frankly, I don’t care at this point. My system will work just fine, just like every other “That’s not REST” system out there.

To help me learn how to be wrong, though, here are a few resources that I’m going to be checking out:

Get Some REST: A work in progress book from Steve Klabnik. I signed up for the mailing list and am eagerly waiting. There’s rumor that Steve might actually be doing it right.

RESTFul Web Services – I bought the Kindle version last night. It’s the book DHH says everyone should read and a few others also suggested it.

REST In Practice – I’m probably going to buy this one, too. It seems to have the “30,000 foot view” that I’m also looking for, according to one reviewer on Amazon.

If anyone else has any resources for how I can learn non-REST, RESTful best practices, I’d love to know.

(end of rant)

 

… Updates

Thanks to everyone who is responding in the comments here and via twitter. I’m going to update this post with the resources that people are pointing me to, from Twitter.

The majority of my experience with anything REST-like comes from working with Ruby on Rails, and mimicking it’s handling of HTTP verbs with Sinatra application. I know this isn’t anything near correct, which is why I’m looking to find good resources.

I’ve been getting a lot of “you don’t need to do pure REST” responses – which I agree with. One of my problems, though, is that I’m having a hard time figuring out what “pure” REST is so that I can know the difference between that and what I’m actually doing.

Sebastian Lambla points out that it’s not the entire REST community that pulls this crap. There are plenty of people that are helping, providing good information and creating good resources to throw at people like me that are wanting to learn. My problem is not with the REST community as a whole, but with the people that behave in the way I’ve pointed out, here.

The most consistent advice I’m seeing so far, is to start with the books I’ve listed / purchases already. That will at least get me heading down a better direction.

Resources From The Twitterverse

http://www.amazon.com/RESTful-Web-Services-Cookbook-Scalability/dp/0596801688

http://code.google.com/p/implementing-rest/

http://www.amazon.com/REST-Design-Rulebook-Mark-Masse/dp/1449310508

The #rest channel on http://freenode.net/ IRC

http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm

http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven

http://amundsen.com

http://www.infoq.com/search.action?queryString=stefan+tilkov+rest&searchOrder=relevance&search=stefan+tilkov+rest


Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Derick Bailey

Derick Bailey is an entrepreneur, problem solver (and creator? :P ), software developer, screecaster, writer, blogger, speaker and technology leader in central Texas (north of Austin). He runs SignalLeaf.com - the amazingly awesome podcast audio hosting service that everyone should be using, and WatchMeCode.net where he throws down the JavaScript gauntlets to get you up to speed. He has been a professional software developer since the late 90's, and has been writing code since the late 80's. Find me on twitter: @derickbailey, @mutedsolutions, @backbonejsclass Find me on the web: SignalLeaf, WatchMeCode, Kendo UI blog, MarionetteJS, My Github profile, On Google+.
This entry was posted in REST. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Anonymous

    HerdingCode had a podcast about this subject, they explain a bit about what REST “really” is and so: 
    http://herdingcode.com/?p=327 (RESTavaganza 115)

  • http://twitter.com/keith_bloom Keith Bloom

    I have both of those books on my reading list so I will be interested in your opinion of them.

    One good resource I found is Martin Fowler’s post http://martinfowler.com/articles/richardsonMaturityModel.html. 

  • Rémi BOURGAREL

    Your POST is not a real true POST.
    There is a big problem in the developer community that everyone thinks he’s doing everything right and everyone else is doing it wrong : every post is title “How XXX must be done.”, if you comment with a bit of alternative you are 100% sure you’ll get “No that’s is the correct way.”

  • http://twitter.com/bsimser Bil Simser

    I remember there was a big rant/post from @kellabyte about what REST was and sites not conforming to it. I also think @clemensv had something to say on that. Unfortunately her site is borked to search so I can’t dig up the post right now.

  • http://www.userinexperience.com Brandon Satrom

    “That’s not REST” always reminds me of people who argue every time someone says “that’s ironic.” 

    This is a good list of resources. I just signed up to be notified about Steve’s book too, so thanks! “RESTful Web Services” is very good. Beyond that, there’s always going straight to the source (Dr. Fielding’s dissertation): http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

  • Anonymous

    I really enjoyed RESTful Web Services. Steve’s book should also be good.
    One part of the problem, as I’ve observed over a period of time, is that ReST in it’s truest form is not practical for the majority of situations in which people try to apply it. As a natural result, you get tradeoffs. But because people still call a bastardized approach “ReST”, information and definitions become diluted and confusion ensues.

    And of course the tradeoffs are often the right thing to do for a given system. Most scenarios would probably degrade if a ReST architecture was followed to the T. (Most systems are not “web scale.” ;) ) The trick is to be clear in identifying what’s an architectural tradeoff and what’s not – but the reality is most people won’t care enough to make the distinction.

    If you really want to know what ReST is, perhaps just read Fielding’s dissertation.
    http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
    But at the same time, perhaps it’s sufficient enough to be familiar with the guiding principles and then apply them as it makes sense to your system’s architectural goals and objectives, being willing to recognize that “it’s not pure ReST, and that’s okay!”

  • http://wizardsofsmart.net/ panesofglass

    RESTful Web Services and REST in Practice are excellent. You should also look at Mike Amundsen’s Building Hypermedia APIs with HTML5 and Node [1] and Subbu Allamaraju’s RESTful Web Services Cookbook [2].

    As far as the “right” way, the best you can do is read Fielding’s thesis, which provides the architectural definition. Once you move past that, don’t think about REST proper. Do you build perfect MVC pattern apps? Probably not. The same is true for REST. It’s an architectural pattern. Grok the elements, then plan out what you need. Mike’s book does an excellent job sticking to the structure of HTTP and barely mentions REST. Besides, if you stick to HTTP’s strengths, you’re likely to fall into REST.

    But why listen to me? I’m an “elitist.” ;)

    [1] http://www.amazon.com/gp/product/B006FZ3T4I/ref=as_li_ss_tl?ie=UTF8&tag=panesofglass-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B006FZ3T4I

    [2] http://www.amazon.com/gp/product/B0043D2ESQ/ref=as_li_ss_tl?ie=UTF8&tag=panesofglass-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B0043D2ESQ

  • http://simonbartlett.co.uk Simon Bartlett

    Sebastien Lamdla is an expert on REST ;)

  • http://twitter.com/colin_jack Colin Jack

    Going back a good few years I agree there was lots of confusion about REST. You had little to go on and if you wanted more you had to visit rest-discuss which was often a fruitless experience.

    Now I’m not so sure, all the books you mention are good and give you plenty of context. My only complaint now is there’s a surge of (rather late) bandwagon jumpers putting out there own content and its often either overly preachy or is dumbed down to the point of uselessness. Not much you can do about that except watch out for those people and ignore them.

  • Lee Brandt

    I’m glad you said it. I was thinking it, but didn’t want to look like a dumb-ass. :0)

  • http://twitter.com/MihaiLazar sharpoverride

    REST Design Rulebook is one book that I really enjoy http://shop.oreilly.com/product/0636920021575.do

  • James Bigler

    I have been trying to read up on REST the last couple days and having been feeling the same way.  I found this article to be helpful for a quick overview and example.

    http://msdn.microsoft.com/en-us/library/dd203052.aspx

  • David Mitchell

    Ah, the irony of a rant on pedantry under a heading that misuses your/you’re.

    • http://mutedsolutions.com Derick Bailey

      ROFL! nice catch :D I’m gonna have to leave that in there, just because of how stupid a mistake it is! :P

  • Rob S.

    Steve Vinoski has quite a few articles on REST and REST related topics here:

    http://steve.vinoski.net/blog/category/rest/ 

    These articles tend to be architectural in nature and from a few years ago when the REST / RPC wars were in full swing.  You might be most interested in his “Checklist for REST” article. 

  • http://twitter.com/sshishkin Sergey Shishkin

    @getsomerestbook:twitter is an awesome stream of good points about rest.
    I also put together a presentation on doing rest wrong: http://shishkin.github.com/presentations/rest/ (doesn’t work well in all browsers).

  • Brad
  • virbots

    That’s because REST seems to define itself by what it isn’t; i.e., it is a list of architectural restrictions; things not to do. E.g., REST is stateLESS; so if you have any server-side session state, that’s not REST.

    If you’re doing something that violates none of what REST isn’t, then you’re doing REST.

  • Andrew

    This doc on (http://info.apigee.com/Portals/62317/docs/web%20api.pdf) Web API Design is all about designing a RESTful api. If you are struggling with the big picture and how it works this is a quick and easy to understand guide. It is created by the folks at Apigee.