Book Review: RESTful Java Patterns and Best Practices
Tuesday, October 21, 2014 |I recently received a copy of RESTful Java Patterns and Best Practices, by Bhakti Mehta for review. Here are my thoughts on the book.
Bhakti Mehta is a former coworker of mine from Sun/Oracle. We both worked on the GlassFish project, though not on the same team. |
![Cover](https://dgdsbygo8mp3h.cloudfront.net/sites/default/files/imagecache/ppv4_main_book_cover/7963OS_cov_0.jpg)
RESTful Java Patterns and Best Practices is a short book, covering many topics. If I had to pick one main issue, that would be this: it felt a bit short to me. That said, the book is well-written, with plenty of examples. The topics covered in the book are:
-
An introduction to REST
-
Resource design
-
Security and traceability
-
Performance
-
Advanced design principles (rate limiting, pagination, i18n/l10n, and HATEOAS)
-
Emerging standards
Each of the chapters introduces the topic at hand, then gives an example or three of the options a developer has in that area. For example, in the resource design chapter, Mehta discusses content negotiation, then shows how it can be done using both HTTP headers and URL patterns. Advice is given on which option to choose and why. The security chapter discusses SAML and OAuth, describing how each approach works. I would have liked to see much more depth here, as this is an area that I, personally, would like a more solid understanding of, but an adequate, thorough discussion of that topic could probably be a book by itself.
The book closes with an appendix that briefly describes three different public APIs: GitHub, Facebook Graph, and Twitter. I thought this was a good addition, as it gives concrete examples of some of the topics discussed in the book, allowing the reader to see what the ideas might look like in practice.
Overall, this was a pretty good book. As I noted at the start, I would really have liked to see more depth in each of the sections. However, Packt has positioned with book as a "Starting" level: "Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user." So, despite what I would like to see, I think the book ably accomplishes the goal of the publisher.
Four stars.