Book review round-up: Java and Spring
7 December 2012, by Harry Cummings
There are plenty of Java books out there, and I’ve read quite a few of them! Here are some of the ones I found most useful:
Effective Java (Joshua Bloch)
This book is definitely worth a read if you want to make good use of Java. It’s not a manual for the language in the manner of the ‘in a Nutshell’ books or Core Java (below). Compared to these kinds of books, it concerns itself with “why”s rather than “how”s, seems to sink in better, and is surprisingly concise. There is a great deal more useful, memorable content in its 300-odd pages than in many programming books that are twice as long.
Recommended chapters: All of them (it’s very good and not a very big book)
Core Java (Cay Horstmann, Gary Cornell)
This book, in two infeasibly large volumes, appears rather daunting but is surprisingly readable compared to other language reference books I’ve come across. The quality of writing is very high, especially compared to most other technical books. The early chapters cover pretty basic stuff, but it starts to get more interesting around chapter 5 or 6. There are lots of call-outs explaining differences with C++ for the benefit of C++ programmers learning Java, which I found more distracting than useful (ironically, they taught me a bit about C++).
The chapters are well laid out with the most pertinent bits of the code called out in the main text, but the full listing at the end of the chapter in case you want to study it in more detail. This actually means that these books aren’t nearly as long as they look, since you’ll usually skip over the full code listings at the end of each chapter, and these make up about 40% of the book. I also skipped all the stuff on GUIs, Swing and AWT, since I was mostly interested in web development. These make up about a third of the second volume, and a large chunk in the middle of the first book. My only criticism of this book is that the examples are a bit Swing heavy (even in the chapters that have nothing to do with Swing), although this is reasonably easy to ignore.
I don’t really think this is essential reading for anyone, but if you do want to read a comprehensive language reference for Java, this is an extremely well-written one.
Recommended chapters: Volume 1 chapters 3-6 & 10-14, Volume 2 chapters 1-5 & 9-11
Spring Persistence with Hibernate (Paul Tepper Fisher, Brian D. Murphy)
This is a fairly thin book that cuts right to the chase and works through the essentials of setting up a Spring MVC application with Hibernate. For the most part, it does a good job of focusing on the most useful and relevant parts of these two huge frameworks. However, it sometimes fails to explain itself very well and leaves a few gaps that you have to fill in for yourself. If you already roughly know the territory then it’s really useful for getting up to speed quickly without having to plough through mountains of documentation. There are some occasional annoying mistakes in the code listings and diagrams, but it’s usually clear enough from the main text how to correct these.
Spring Recipes: A Problem-Solution Approach (Gary Mak)
This book sets out to be a comprehensive reference on the latest version of Spring. This is a huge undertaking but it actually does a pretty good job. The book generally strikes a good balance between small, focused examples, and more generally applicable background knowledge. I could have benefited from a bit more depth on Spring MVC, but generally the content was very good.
Recommended chapters: It depends on what you’re using Spring for. Just familiarise yourself with the content and treat it as a reference book. It’s worth skimming the whole book though, as you might pick up a few things you didn’t know about.