Readers: 70 | Updated: 2007

Guidelines for Building RESTful Web Services

Translate Into:

In a comment on my previous post, pwb states

"REST" still suffers mightily from no real guidance on how exactly to construct something REST-ful. A dissertation doesn't cut it.

I guess it depends on what is meant by "real guidance". I can argue that there is no real guidance on how to construct object oriented systems, distributed applications or high performance data storage systems. Whether you agree or disagree with any of those statements depends on how "official" or "canonical" one expects such guidance to be.

If you are interested in building RESTful Web services. Here are the top 3 ways I suggest one learn about building and designing a RESTful system. 

  1. Learn the Atom Publishing Protocol: The best way to figure out how to build a RESTFul Web service is to actually use a well designed one and none is a better example of what a RESTful Web service should be than the Atom Publishing Protocol. For extra credit, you should also read up on Google's GData protocol and come up with a list of pros and cons of the approaches they've taken to extending AtomPub.

  2. Read Joe Gregorio's "Restful Web" column on XML.com: Joe Gregorio is one of the editors of RFC 5023 (the Atom Publishing protocol) and is currently employed at Google working to make GData even more Web friendly. He started a series of articles on XML.com on building and designing RESTFul Web services complete with code samples. The entire list of articles can be found here but if you don't have the time to read them all, I suggest starting with How to Create a REST Protocol which covers the four decisions you must make as part of the design process for your service 

    • What are the URIs? [Ed note - This is actually  "What are the resources?" ]
    • What's the format?
    • What methods are supported at each URI?
    • What status codes could be returned?

    If you have more time I suggest following that article up with Constructing or Traversing URIs? which contrasts client access models based on URI construction [where clients have baked into them knowledge of the URI structure of your service] or by URI traversal [where clients discover resources by following links either within the primary resources your service returns or via a service document that describes your service's end points]. Just because WSDL is a disaster doesn't mean that interface definition languages aren't useful or that they aren't needed in RESTful applications. Afterall even Atom has service documents

    And finally, because I don't believe you get to design a system without being familiar with what the code looks like and should do, I'd suggest reading Dispatching in a REST Protocol Application which walks through what the server side code for a particular RESTful service looks like. He even throws in some performance optimizations at the end.

    Of course, I know you're actually going to read all the articles in the series because you're a dutiful lil' Web head and not shortcut seeker. Right? :)

  3. Buy "RESTful Web Services" by Leonard Richardson, Sam Ruby, and David Heinemeier Hansson:  If you are the kind of person who prefers to have a book than learning from "a bunch of free articles on the Internet" then RESTful Web Services is for you. I haven't read the book but have seen it on the desks of more co-workers than I'd care to admit and each of them favorably recommended it.  Sam Ruby, Leonard Richardson and DHH know their stuff so you'll be learning at the feet of gurus. 

To me, this seems like an abundance of resources for learning about building RESTful Web services. Now I understand that there are some for whom until it shows up on MSDN, IBM Developer Works or in a Gartner Report it might as well not exist. To these people all I can say is that "It must be great to have all that free time now that you have outsourced your thinking and business critical analysis to someone else". :)  


From The Blogs

Wake Up Later: Freelance + Passive Income

04-11
Setting Guidelines for Turning Down Freelance Work
Throughout the span of this blog's existence, the question I've seen most is, "How can I find more/better freelance work?" To be sure, this is probably a key aspect for most freelancers, often causing... 查看全文

2007
Guidelines To Follow For A Successful Interview
Being prepared for the job interview will show prospective employers you ARE the right choice. Dress for success, and have the right attitude to ace that interview.Your hard work has paid off - you ha... 查看全文

Practical Parenting Tips

03-20
Useful Guidelines To Become Pregnant
Pregnancy is a magnificent experience for many women. There is a new development each day during the term of the pregnancy, and the soon-to-be mother naturally wants to keep track of every little chan... 查看全文

Healthy Children

07-16
New Cholesterol Guidelines for Kids
On 7/7/08, the American Academy of Pediatrics issued new guidelines for monitoring and treating children with high blood cholesterol levels.* The stakes could hardly be higher. 查看全文

The Beauty Brains

06-13
Do Designer Sunglasses Give Better UV Protection Than Cheap Ones?
Diana dares to ask:Do cheap sunglasses provide the same amount of UV ray protection as more expensive sunglasses? Does it matter? I understand theFDA does not regulate this (not that I think they shou... 查看全文

The Baby Mum-Mum Blog

07-15
Mum Mum's Blog Report: Breastfeeding Mothers Should Note Baby's Hunger Pangs in Time; Top 10 Baby Names; AAP Announces New Cholesterol Monitoring Guidelines for Infants
This is a selection of recent popular blogs from Mum Mum, where parents can find information n everything to do with babies and parenting with an emphasis on health and nutrition. Breastfeeding Mother... 查看全文

One Big Health Nut

04-22
New exercise guidelines provide the answer to weight loss and the obesity crisis.
The Center for Disease Control and the ACSM recently revised and published the newest updates to the national exercise guidelines, which were recently released to the public.  Since the updates in the... 查看全文

One Big Health Nut

04-10
Weight Lifting Guidelines and advice for Beginners
Beginning a weight lifting regiment is challenging, especially if you have never lifted weights before.  There are certain fundamental factors that must be considered.  You must decide which exercises... 查看全文

Life Optimizer

07-17
4 Guidelines for Increasing Daily Happiness
Note: This is a guest post by Stu from ImprovedLives. In the last few years the psychological study of happiness has experiencedamazing growth. Happiness, once a subject that barely got any attention ... 查看全文

Simon Wakeman - Marketing and public relations

10-04
New CIPR consultation on social media guidelines
Back in early 2007 the Chartered Institute of Public Relations (CIPR) launched a set of social media guidelines for practitioners using social media. Life moves on quickly in social media and public r... 查看全文
More Articles