Let me begin by saying I don’t feel this book is appropriate for anyone brand new to the Java programming language. A few months back I recommended Michael Ernest’s Java SE 7 Programming Essentials as the quintessential guide for beginners in Java programming. And it is. But once you’ve gone through that book, you should head straight to Learning Java by Patrick Niemeyer and Daniel Leuck. In my assessment, this is one of the best and most authoritative editions of Java 7 ever put out by O’Reilly. From the introduction, the authors demonstrate their knowledge of not only the history of Java but how it has matured and how developers today should approach using it.
Interestingly, this is the first Java title in awhile I’ve seen that jumps into the language but simultaneously offers an up-front tutorial of the Eclipse integrated development environment, arguably one of the most popular IDE’s in use for Java programming today. In fact, the first three chapters gives an overview of the language, demonstrates a first application and then describes how to implement the sample code inside Eclipse. (There’s also an Appendix with more thorough coverage on Eclipse).
The next few chapters takes a sweeping look at Java on a number of levels. First, the authors give just the right amount of attention to Java types, and explain object-oriented program and the relationships between objects. This includes coverage on properties, fields, methods and constructors. It wraps up with a look at enumerations and generics. By the time you reach 250 pages, you’ve been taken on a grand tour of the language and given a solid grounding in its practical use.
Rather than dive deep at that point into the language, I was surprised to find the authors turn to a discussion on threading! I found this a little bit of an unusual choice for this juncture in the book (particularly since it followed on with a discussion of the String object), but it was no less enjoyable and in some regards made sense.
The book then takes a look at I/O and networking, followed by a natural segue to web programming and web services (yay)! This was undoubtedly a highlight for me in the book from just the sheer amount of sample code and practical advice.
Chapters 16-19 provided more than 150 pages on the topic of Swing and Layout managers, something that is woefully lacking in other books. Two more chapters finally wrap the UI aspects with discussions of the APIs for graphics rendering and drawing.
I felt the text concluded with a bit of oddity. For example, there’s a chapter on Applets that I would’ve expected to come earlier, perhaps coupled with the web development pieces. There’s an excellent overview into the serialization, reflection and design of JavaBeans, but it lacked a more comprehensive look I felt it deserved. The last chapter comprised about 50 pages on XML.
As with any book of this size, organization is a critical factor and probably one of the most difficult for technical editors and writers. Overall I think O’Reilly’s team did a fine job with this fourth edition. I feel the chapter on XML might have been better served following the discussion on I/O since there are parallels. Finally, I was utterly surprised not to find any significant coverage of databases other than in relatively short or contrived examples. I think a chapter on this would’ve made the text better, although at what cost to the other content would be called into question.
At the end of the day I would rate this a solid 4/5 stars by O’Reilly’s rating criteria. I recommend this book on its many good merits of topic coverage, and on the competence and expertise clearly demonstrated by its authors.
* In the interest of full disclosure, I received a free copy of the book from the publisher in exchange for writing this review. However, all opinions and observations regarding the text are my own, and based on my experience as a professional developer.