I've been waiting for a book on Java and REST for a few months, and when I saw this book included chapters on the Jersey and Restlet frameworks, I bought it without a second thought.
On the positive side, the book provides a decent introduction to four frameworks, Jersey, Restlet, RestEasy and the Rest plugin for Struts. The comparisons are useful, and in the Struts section the comparison to Ruby On Rails is also useful. In addition, I understand the JAX-RS standard a bit better after reading the book.
On the negative side:
* Lots of printed boiler plate code. Is there any reason to list full implementations of code on the page? Is there any reason to repeat large portions of it as it's discussed? Two of the frameworks implement the JAX-RS standard, and the *same code*, pages and pages of it, is printed in both chapters.
* A good deal of the code listings represent bad practice. Here, I referring to hand generated xml and json strings. The reader would have been better served with a chapter introducing ideas of binding objects to serializations, then a discussion of the various serialization libraries that are out there, especially JAXB and Json-lib. I would've discussed other content-types as well, especially xhtml.
* Where's WADL? A big gap with REST thus far is the lack of schemas, validation and type support. WADL is a step toward filling this hole. WADL isn't mentioned in this book, nor are the issues it's trying to solve. A discussion of JAXB would have fit nicely here as well.
In, summary, I'm aware that untyped languages like Ruby and Python are successfully employed in RESTful applications, but I was hoping that a book on RESTful Java would show how type safety and well defined APIs are compatible with the REST philosophy. This book doesn't provide that material, and I'm left to wonder why the authors chose Java as a language in the first place, as they leverage none of its strengths.
The approach we take is ideal for software developers with some, or extensive, programming experience: we design a RESTful API, which serves as our software specification, and implement it with every framework discussed in the book—there are no hypothetical examples; only practical working applications. This book is for Java developers who want to code RESTful web services using any of the open source RESTful frameworks available to date, for example, JAX-RS implementations such as Jersey and RESTEasy, the Restlet lightweight framework, or Struts 2 with the REST plug-in. You don't need to know REST, as we cover the theory of REST and web services; however, you should be familiar with the Java language and have some understanding of Java web applications. For each framework, we develop the same web service outlined in Chapter 4, so there is lots of working code available. This is a practical guide and the majority of the book is about coding RESTful web services, and not just about the theory of REST.