review: Client-Server Web Apps with JavaScript and Java
¶ by Rob FrieselHaving just wrapped up Client-Server Web Apps with JavaScript and Java by Casimir Saternos (O’Reilly, 2014), I’d say that I mostly got out of it what I wanted, and that it serves as a good jumping-off point for developers that want to build “modern” web applications on top of the JVM. More than anything else, Saternos’ book is a thumbnail sketch of the architecture and tools needed to build those kind of apps, but it does not go particularly deep on any one of those items. As it says in the preface, it’s probably best suited for developers who primarily work in Java and want to build a scalable web application with modern technologies — not that front-end developers don’t stand to gain something as well, but they may have more catching up to do (more on this in a moment…).
Saternos’ basic approach here is to describe “modern” web applications as RESTful, API-based back-ends that primarily serve JSON to a rich front-end that is built around something like AngularJS. However, he doesn’t limit himself to just the API and front-end layers here. Even a glance at the table of contents will reveal that he goes for breadth in his discussion: there are chapters on REST fundamentals and API design, API implementation with tools like Jersey, testing strategies with JUnit and Jasmine, build and deployment tooling, virtualization strategies, and more. The book’s coverage is fairly shallow, but Saternos provides many references to other sources for richer coverage, and he also provides sample code with example implementations for each relevant chapter.
Was there anything missing? Yes and no… Again: the book is a shallow survey of these technologies, and as such it elegantly fulfills its main mission: to give an overview of the technologies that you would use when constructing a modern web application in the JVM. And again: there are plenty of references to solid foundational texts for those instances where you need to go deeper on some particular subject. But there are also seem to be some gaps.
First, some front-end developers may feel a bit lost coming into this; working in the JVM can be a bit daunting to the new-comer, and piling dynamic languages on top of this can be a bit eyebrow-raising. Part of me thinks that this is absolutely the right move — I know a lot of front-end developers that are right at home in Ruby or Python, and so using JRuby or Jython as the introduction to the JVM makes sense. But there are also esoteric complications that come along with that which are not really addressed in the book. Not that a survey such as this is the right place to cover that kind of edge-case trivia, but a footnote to that effect may have been useful.
Second, the chapter on “Packaging and Deployment” focused exclusively on the server side of the web application with no substantive mention of how to package the front-end assets. Where was the discussion of minification and concatenation? Considering the depth of the discussion on REST and HTTP earlier in the book, I would have expected to loop back around on that here for a discussion of CDNs or Expires headers. This seemed like a lost opportunity to me.
In the grand scheme of what Saternos set out to do however, those critiques are pretty minor. That he assumes the reader has more familiarity with the JVM than with front-end technologies is evident, but not a detriment. The book is a good look into what technologies and techniques make up a “modern” web application, and though there is plenty of room for disagreement about some of his recommendations, it is also a great “conversation-starter” for your project, and chances are that you’ll learn about a thing or two that you’ll want to chase down further.
Disclosure: I received an electronic copy of this book from the publisher in exchange for writing this review.
Leave a Reply