RESTful Web Services

Web services for the real world

By Leonard Richardson, Sam Ruby
May 2007
Pages: 446
ISBN 10: 0-596-52926-0 | ISBN 13: 9780596529260
starstarstarstarstar (4) (Average of 10 Customer Reviews)

Buy 2 Get 1 Free Free ShippingGuarantee

Description

You've built web sites that can be used by humans. But can you also build web sites that are usable by machines? That's where the future lies, and that's what this book shows you how to do. Today's web service technologies have lost sight of the simplicity that made the Web successful. This book explains how to put the "Web" back into web services with REST, the architectural style that drives the Web.
Full Description

"Every developer working with the Web needs to read this book." -- David Heinemeier Hansson, creator of the Rails framework

"RESTful Web Services finally provides a practical roadmap for constructing services that embrace the Web, instead of trying to route around it." -- Adam Trachtenberg, PHP author and EBay Web Services Evangelist

You've built web sites that can be used by humans. But can you also build web sites that are usable by machines? That's where the future lies, and that's what RESTful Web Services shows you how to do. The World Wide Web is the most popular distributed application in history, and Web services and mashups have turned it into a powerful distributed computing platform. But today's web service technologies have lost sight of the simplicity that made the Web successful. They don't work like the Web, and they're missing out on its advantages.

This book puts the "Web" back into web services. It shows how you can connect to the programmable web with the technologies you already use every day. The key is REST, the architectural style that drives the Web. This book:
  • Emphasizes the power of basic Web technologies -- the HTTP application protocol, the URI naming standard, and the XML markup language
  • Introduces the Resource-Oriented Architecture (ROA), a common-sense set of rules for designing RESTful web services
  • Shows how a RESTful design is simpler, more versatile, and more scalable than a design based on Remote Procedure Calls (RPC)
  • Includes real-world examples of RESTful web services, like Amazon's Simple Storage Service and the Atom Publishing Protocol
  • Discusses web service clients for popular programming languages
  • Shows how to implement RESTful services in three popular frameworks -- Ruby on Rails, Restlet (for Java), and Django (for Python)
  • Focuses on practical issues: how to design and implement RESTful web services and clients
This is the first book that applies the REST design philosophy to real web services. It sets down the best practices you need to make your design a success, and the techniques you need to turn your design into working code. You can harness the power of the Web for programmable applications: you just have to work with the Web instead of against it. This book shows you how.



Featured customer reviews

Write a Review


Eye-opener for REST,  April 07 2009
Rating: StarStarStarStarStar
Submitted by Grzegorz Borkowski   [Respond | View]

For a long time I've heard much about REST, RESTful etc. It sounded interesting, but vague. I've read definitions of REST on wiki, then I also read many articles about this technology, but still I wasn't able to clearly see what it's all about and how to use it. They always talked about "representations", "connectivity", etc. but it all looked too much theoretical.
Finally, I've found this book and read it from cover to cover. This was eye-opener for me. After reading this book, I finally understand what is REST, I know how to use it, I know all (or most) the gotchas and recipes, and I'm a big fan of REST. This technology is fantastic, and the book is really definitive guide to it. I recommend it to anybody who wants to start playing with REST.
From my perspective, this book has only one disadvantage: all examples are in Ruby, and I'm Java programmer, so sometimes it looked a bit cryptic to me. But of course, you can understand the general meaning of the code even if you don't know Ruby - besides, everything is described in the text anyway.


Very educational,  January 12 2009
Rating: StarStarStarStarStar
Submitted by in2clouds   [Respond | View]

This is a very interesting and very educational book. The subject is very relevant and the authors are very knowledgeable. I hesitated a bit before ordering b/c I have read a few negative reviews stating that the content was very redundant. I think there are some chapters that could be streamlined but I appreciated the author's thoroughness and methodical approach. It is true that the REST concepts are repeated throughout the book but I think that was by design. To show conceptual consistency across technologies and applications. I also think it was done to provide a step by step practitioner's approach to REST. I found this book to be a great one-stop resource for REST and before reading it I had struggled to find clear definitions and practical examples with code online. I recommend this book to beginners and intermediate REST readers. Experienced people might not find enough "juice".


One of the most pertinent books for WOA,  September 30 2008
Rating: StarStarStarStarStar
Submitted by Arun Batchu   [Respond | View]

At the time of writing, this is one of the best books that makes Roy Fielding's ReST philosophy more accessible to the pragmatists - the builders on the ground.
As a Systems' architect who has to deliver business applications on a daily basis, I struggled to make sense of what exactly is ReSTful-ness...like any nascent, emergent, powerful and useful thing, ReST meant a lot of things to a lot of people. The literature on the web touched upon different manifestations but lacked the power to communicate a holistic view.
Thank goodness I landed on this EXCELLENT book that described the vision and took me through a journey of the ReSTfulness spectrum - not all supposedly ReSTful services are ReSTful. I understood the power of the human Web and now I realized how the same architecture and design will work for the data/document web; The comparing and constrasting of the ReSTfulness of flickr, del.icio.us, amazon's s3 API's was illuminating. The explanation of HTTP - how it works and how it is supposed to work and how the power could be leveraged opened up new windows and doors.
Fielding's work made more sense now. The foundational principles were getting clearer and clearer.
It became ( and still is) a reference book. Its a book I carry everywhere. I "steal" time to re-read some of what is being said whenever I get time.
Yes, there are a few things that could be improved. But who cares? When you find water in a desert, do you stop to whine about a few sand particles? This book's strengths outnumber the weaknesses many times over.
Because of this book, I feel that I can inspire my team to build a scale-free application that unifies the enterprise just like the larger web did. At last I have found the unifying vision that will save me from re-inventing plumbing. I can now move on to focus on the business architecture. No more plumbing - the customer is waiting!
To the other ignorant reviewers who did/do not get this seminal work, please delay publishing your ignorance for a few more years...and save yourself the ignominy of having commented on something you have little understanding of.


Read all reviews


worst O'Reilly book ever seen,  May 22 2008
Rating: StarStarStarStarStar
Submitted by Anonymous Reader   [Respond | View]

I tried to read this book but my experience was frustrating. Very often I feel annoyed by the author's blahing. No doubt there are shining points in this book, but they are buried in overwhelming nonsenses. This book doesn't worth reading, it's wast e of time. Just find some short articles, and enjoy the true technology.


Eye-opening experience,  May 02 2008
Rating: StarStarStarStarStar
Submitted by Daniel Williams   [Respond | View]

This is the kind of book that I love O'Reily for. Richardson and Ruby have taken what can be and too often is treated as an arcane subject, and pulled out the core concepts.

The book should be read in the abstract. I have never coded with Ruby or Rails, but that is not the point. The authors distill just what is HTTP and how it works, and lay out, using the basic built-in functionality of http, how you can create intelligent and useful web services and clients. And what do you know - coding with the http protocol in mind naturally results in your writing ReSTful applications. This is what sticks in my head about this book, just that simple concept.

This book really takes you to the core of how the web works - sending http requests and getting http responses. That is it, nothing more. Now many frameworks exist to add functionality to this basic request/response pattern. But until you understand the core concepts, you will never really know how to code for the web. And advanced frameworks often make matters worse by hiding what is really going on so much that developers can spend days learning the framework and missing what is fundamentally going on.

In my opinion, ReSTful web services is a nice application of core http, a good way to illustrate how the web works, and how to work with the web, instead of against it. A book solely dedicated to http would likely get bogged down in unused standards and technical detail.

But this book really nails down what programming on the web means, and how to write well-behaved applications. While I may never code in Ruby, or make a web client to interface with flickr, what I learned in this book will serve as a foundation for all of my future web work. And I am deeply grateful for that.




Needs updating to Rails 2.0,  February 11 2008
Rating: StarStarStarStarStar
Submitted by Anonymous Reader   [Respond | View]

I started this book with much anticipation. It starts out very well with small working examples for accessing non-RESTful websites. As soon as it got into RESTful designs with Ruby, things fell apart. All the examples are for Rails 1.2. The current version is 2.0 and it is significantly different in this area. I have now spent several days trying to educate myself on the difference so I could fix the examples.

In addition there are a couple laborious chapters where the author takes you through the design philosophy of a RESTful design. Although this was good, the chapters could have been made shorter.

Please post updated examples!


Doug Hellmann photo Very helpful,  September 09 2007
Rating: StarStarStarStarStar
Submitted by Doug Hellmann | O'Reilly Blogger   [Respond | View]

We read RESTful Web Services as the inaugural book for the Atlanta Python Users' Group Book Club (http://pyatl.org/bookclub/) , and it was excellent. The REST and ROA principles make a lot of sense, and the presentation in the book is clear and concise. Check out my complete review (http://blog.doughellmann.com/2007/09/book-review-restful-web-services.html) on my blog, and the discussion on the PyATL book club forums (http://groups.google.com/group/pyatl-book-club/topics) .


RESTful Web Services - required reading for service developers,  September 07 2007
Rating: StarStarStarStarStar
Submitted by John   [Respond | View]

This book actually writes down the specific techniques for adhering to the previously somewhat nebulous REST architectural style. I still might not be able to describe this style concretely, but I can think I can safely say "I knew it when I read this book."

My full review is on my blog (http://appliedlife.blogspot.com/2007/08/rest-and-mindfulness.html)


Most Significant Book on Web Technology,  August 24 2007
Rating: StarStarStarStarStar
Submitted by Daniel Bennett   [Respond | View]

I believe that this book should be required reading for anyone who works on anything related to the Web. For the first time, this book makes a clear how using the simple built-in technology of the web, web sites can be both human and machine readable. And that most of the agony of convoluted API's are completely unnecessary. Thanks to the writers for taking the brilliance of Roy Thomas Fielding's original dissertation and creating an insightful and approachable book with concrete examples.


Excellent Book - Easy to read, valuable, interesting, a milestone in web services,  May 24 2007
Rating: StarStarStarStarStar
Submitted by Avi Flax   [Respond | View]

I just finished the book, reading it cover-to-cover within 36 hours. It's excellent - concise, clear, comprehensive, with a great mix of practical information and theory, and an impressively even depth. I've been developing RESTful APIs for over 18 months, and I see the release of this book as a major milestone in the raucous development of RESTful service design.


Media reviews
"Every IT generation has its seminal tome that transcends time and connects the dots in a way that no book had before it. For the object oriented generation in the 1980s, it was the Gang of Four (GoF) book. For the application architecture generation in the 1990s, it was Fowler’s book on patterns (PoEAA). RESTful Web Services will be, in my opinion, that book for the 2000s Web services generation."
-- Thomas Beck, Beckshome.com: Thomas Beck's Blog


"As with the previous O’Reilly books, I found RESTful Web Services to continue in the successful tradition of presenting potentially complicated information in such an easy to follow and logical manner. It is obvious that the authors used their considerable experience in giving us the best of the best, and I have no doubt that my every question will be answered. Aimed to being the first book to apply the REST design philosophy to real web services, I have to congratulate the authors and O’Reilly Media for giving us users exactly that!"
-- Alain B. Renaud, TCM Reviews


"The book intends to act as a canonical reference for all things RESTful. The web is littered with hundreds of resources describing REST and RESTful services, but this book is a one stop shop for understanding REST. The authors' goal is to demonstrate the power and the limitations of the basic web technologies (HTTP/URI/XML) and how they can be harnessed for vastly scalable distributed applications that do not go against the grain of the web. Concrete principles for designing RESTful web services (the Resource Oriented Architecture) are explained in detail...The book is well written and I had no trouble finishing off all the ~400 pages. For this it gets a 5* for readability. The material presented is well researched and very useful for both experienced and new web programmers, fetching it a 5* rating for relevance."
-- Aditya Gore, JavaLobby



Read all reviews

See larger cover

"Every IT generation has its seminal tome that transcends time and connects the dots in a way that no book had before it...RESTful Web Services will be, in my opinion, that book for the 2000s Web services generation."
--Thomas Beck, Beckshome.com: Thomas Beck's Blog