Aditya Gore has a bachelor's degree in Computer Science and about 6 years of development experience with Java and related Technologies. Currently he works for NDS in Bangalore in the Set Top Box area developing Java applications.
| Author(s) | Leonard Richardson, Sam Ruby |
|---|---|
| Publisher | O'Reilly |
| PubDate | 2007, edition #1 |
| Reviewer | Aditya Gore |
![]() |
Purchase and help Javalobby |
|
Positives
Negatives
|
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.
This book is written with a very generic audience in mind. Newbies to the world of web services (yours truly included) can read the book from cover to cover and emerge on the other side equipped with enough knowledge to attempt designing RESTful web services. For veterans used to the world of the 'Big Web Services (WS-*)', this book will induce a new way of thought for developing web services using RESTful principles.
The book stays true to its title "RESTful web Services" by outlining all the principles and concepts surrounding REST. This book has enough supporting material for getting non-web-service savvy readers up to speed with the buzzwords and theory.
Chapter 1 - The programmable web and its inhabitants introduces the concept of the programmable web. It surveys the current state of the programmable web and provides an overview of 3 types of architectures that make it up: RESTful, RPC and REST-RPC hybrid. This is a turbo charged introduction of web services for a novice reader.
Chapter 2 - Writing Web Service Clients explains how to write clients for existing web services using nothing more than an HTTP library and an XML parser. Examples in Java/PHP/Ruby/Python/C# for accessing the del.ic.io.us (social networking site) REST-RPC hybrid API are provided. Again, for a lay reader, this is a very good introduction to what web service clients typically look like.
Chapter 3 - What makes RESTful Web Services different? builds upon the contents of chapter 2 to examine the salient features of RESTful web services. The Amazon S3 service is used as a model to explain a purely RESTful web service. The authors peel away the layers of the RESTful architecture to examine the core concepts that make up this architectural style. This chapter lays a solid foundation for the next chapter.
Chapter 4 - The Resource-Oriented Architecture examines the RESTful architectural style not in terms of terminology but in a concrete form in the context of what the authors term the Resource Oriented Architecture (hereafter ROA). Four important REST concepts: resources, resource names, representations and links between them are introduced. The authors also explain in detail the most important features of RESTful web services that sets them apart: addressability, connectedness, statelessness and the uniform interface. This is an excellent definition of REST in general and ROA in particular - I enjoyed reading it very much.
Chapter 5 - Designing Read only Resource Oriented Services takes a fictitious map application (influenced by Google maps) as a concrete use case for designing a RESTful service. To limit the amount of information that the reader has to cope with, the authors restrict themselves to designing this as a read only service that only serves clients precooked cartographic data. The purpose of this chapter is to demonstrate how the GET/HEAD/OPTIONS methods of HTTP's uniform interface can be harnessed for serving resources.
Chapter 6 - Designing Read/Write Resource Oriented Services extends the previous chapter to demonstrate how users can create their own resources (user accounts and user-defined places on a map) in the map service. This chapter shows how the other methods of HTTP's uniform interface (PUT/POST/DELETE) can be used to create/delete resources.
Chapter 7 - A Service Implementation uses a social networking website (like del.ic.io.us) as a concrete example to design a RESTful web service using RoR. This chapter tries to show how a slightly different line of thought can result in a purely RESTful web service that exposes the same rich functionality as a REST-RPC hybrid service. Chapters 5, 6 and 7 together is a strong foundation on which to base RESTful web service implementations.
Chapter 8 - REST and ROA best practices collects all the best practices described in the previous chapters in a single place. This should serve as a canonical reference for someone wishing to implement a RESTful web service. Keep this under your pillow!
Chapter 9 - The Building Blocks of Services describes the other useful technologies (other than HTTP, XML and URIs) that are useful in constructing meaningful web services.
Chapter 10 - The Resource Oriented Architecture Versus Big Web Services compares and contrasts the 2 main web service architectures i.e. REST and WS-*. The authors try to demonstrate how according to them RESTful web services are more scalable, simpler to use and create and more inline with the philosophy of the web in general. This is an excellent albeit one sided comparison.
Chapter 11 - Ajax Applications as REST clients is sort of an extension of chapter 2. It speaks about how AJAX clients can behave as clients for RESTful services. This chapter doesn't seem to add great value to this book since after all AJAX clients are just web clients written in a certain way (using XMLHttpRequest).
Chapter 12 - Clients for RESTful services quickly runs through three very popular frameworks for RESTful web services: Restlets (Java), Ruby on Rails and Django (Python).
Appendix A - Some Resources for REST and some RESTful resources is a listing of resources about the RESTful architectural style and some RESTful web services on the WWW.
Appendix B - The HTTP response code Top 42 lists all the HTTP response codes and typical situations in which to use them.
Appendix C - The HTTP Header top infinity lists all the HTTP headers and their typical use.
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.
| Relevance | |
|---|---|
| Readability | |
| Overall | |
REST wiki
REST - WikiPedia
XML.com: How to create a REST protocol