Book Review: The Well-Grounded Java Developer
Join the DZone community and get the full member experience.Join For Free
java-related books are perhaps the most widely available books in terms of diverse selections of any programming language. even so, most java books seem to fall into one of two categories: they are either introductory/general level books or they are highly focused specific books. these books all have their place and many of them have been beneficial to me in my career, but i'm always on the look out for that rare combination of the two: the book that is relatively general in terms of java coverage, but is more advanced or looks at the topic quite differently than an introductory or typical general java book. books such as effective java and java: the good parts come to mind as books that strive to hit this sweet spot. in this book review, i look at soon-to-be-released (in print, with electronic version available already) the well-grounded java developer , a book whose topic selection has interested me since first hearing about it in early 2011.
the initial paragraph of the "about this book" section summarizes the authors' intent:
welcome to the well-grounded java developer . this book is aimed at turning you into a java developer for the modern age, reigniting your passion for both the language and platform. along the way, you’ll discover new java 7 features, ensure that you’re familiar with essential modern software techniques (such as dependency injection, testdriven development, and continuous integration), and start to explore the brave new world of non-java languages on the jvm.
the authors of the well-grounded java developer , ben evans and martijn verburg , are instrumental players in the london java community , a member of the java se/ee executive committee in the java community process . both also speak at java-related conferences with martijn being well-known as the diabolical developer and ben evans as "the voice of reason?"
the title of the book and the selection of topics are what appealed to me most about the advertised content of the well-grounded java developer when i first saw its table of contents in the early meap edition. the chosen topics seem appropriate for experienced java developers who are too busy developing solutions for their customers to spend time trying out features of java 7, delving deeply into the intricacies of java and the jvm, or playing with the major alternative jvm languages. i have worked with many solid java developers who are great at java, but don't have the time or inclination to play with the latest versions of java or with jvm languages other than java until or unless they need to for their job role. this book is a perfect quick introduction to these topics for such developers. a single book provides the highlights of java se 7 along with introduction material related to the three most popular non-java jvm languages. it also throws in in-depth coverage of some advanced topics for making good java developers better. in addition, the book includes information on modern java development tools.
the well-grounded java developer is divided into four multi-chapter parts along with five appendices. part 1 ("developing with java 7") introduces new features of java se 7 with focus on project coin (chapter 1) and nio.2 (chapter 2).part 1 : java 7
chapter 1 ("introducing java 7") briefly discusses java the language and java the platform along with other general characteristics of the java programming language (open source now, compiled or interpreted nature, etc.). the remainder of the first chapter covers various project coin features including switching on string , enhanced numeric literal syntax , improved exception handling , try-with-resources ( automatic resource management ), diamond operator syntax , and simplified variable arguments .
chapter 2 ("new i/o") provides brief overview and history of nio in java before delving into details of java 7's nio.2 . the chapter introduces nio.2 via the all-important path interface and looks at how this new interface enables improved file input/output (with files class and other handy new files handling mechanisms ).part 2 : vital techniques
part 2 ("vital techniques") of the well-grounded java developer continues covering new java 7 features, but the focus is shifted from the first part. in the first part, the focus was on the features new to java 7. in the second part, other features new to java 7 are covered, but in this part they are covered as a means to a different end than simply introducing new java 7 features. the intent of this second part is to provide more in-depth coverage of "vital techniques" that java developers should know. as the introduction to this part states, it is about "exploring vital programming knowledge and techniques with java." these "vital techniques" are dependency injection (chapter 3), concurrency (chapter 4), class files and bytecode (chapter 5), and performance tuning (chapter 6).
although there are great books devoted to some of these topics covered in part 2 ( java concurrency in practice and java performance for example), many java developers don't have the time, interest, or inclination to purchase and read these books. these chapters help to get a java developer going with these ideas and more comprehensive books can be referenced when more comfortable with the subject or when more details are needed.
chapter 3 ("dependency injection") provides an introduction to dependency injection (di) and contrasts it with the encompassing concept of inversion of control (ioc). the chapter introduces jsr 330 (" dependency injection for java ") and discusses using google guice as an implementation of jsr 330.
the introduction to chapter 4 ("modern concurrency") includes this description of the intent of the chapter:
the aim of this chapter is to make you aware of the underlying platform mechanisms that explain why java’s concurrency works the way it does. we’ll also cover enough general concurrency theory to give you the vocabulary to understand the issues involved, and to teach you about both the necessity and the difficulty involved in getting concurrency right.
chapter 5 ("class files and bytecode") is one of the book's chapters that i think can be of most value to the highest percentage of intermediate to advanced java developers. classloading is one of the most frustrating issues in java development and the fifth chapter attacks that topic head-on. a feature new to java 7, method handles , are then covered. method handles are described in this chapter as the "new java 7 way to achieve the same ends [as the java reflection api ], with much cleaner code."
when i reviewed the book java reflection in action , i noted that one of its few weaknesses was its age (2004/jdk 1.4) and i concluded that "the most glaring omission from a book on java reflection is java 7's introduction of method handles, but few java books in print today cover these." the well-grounded java developer is a welcome exception to this statement with an entire section (5.2) devoted to the topic.
i've been a big fan of the javap tool ("java class file disassembler") that comes with the hotspot sdk, but one of the things that has made it more difficult to learn to use that tool effectively is lack of easily accessible documentation on it. section 5.3 ("examining class files") of the fifth chapter goes a long way toward remedying that deficiency. besides introducing javap, the ambitious 5.3 section also covers reading bytecode. this chapter is dense with detail, but this is welcome detail and a great introduction to the subject.
the final section of chapter 5 (section 5.5 on "invokedynamic") introduces java 7's invokedynamic . the introduction to the section notes where this subject likely likes in terms of interest to general java developers:
[invokedynamic] isn’t a feature that will necessarily be used directly by every working developer, because it involves a very advanced use case. this feature is for frameworks developers and non-java languages at present.
chapter 6 ("understanding performance tuning") introduces java and jvm performance tuning by reminding the reader that performance tuning is often not necessary and depends on measurement with realistic loads. the chapter provides definitions of performance-related terminology and introduces "a pragmatic approach to performance analysis." this sixth chapter also discusses the garbage collection in more details than most java developers are probably aware of and introduces some of the oracle (hotspot) jvm options that can be used.
chapter 6 also introduces another oracle jvm command-line tool ( jmap ) ["memory map"] and provides descriptive text on how to read jmap 's output (similar to approach used with javap coverage in chapter 5).part 3 : alternative jvm languages
part 3 ("polyglot programming on the jvm") moves beyond the java programming language and focuses on alternative languages running on the jvm. the authors point out that learning about these alternative jvm languages can be useful to java developers because "many of the new ideas that will be needed in the future are present in other jvm languages today." i'll also add that, at least in the case of groovy , i've found it useful already for things where java is not as strong (scripting).
chapter 7 ("alternative jvm languages") introduces this third part of the book focused on alternative jvm languages. this chapter covers why one would be interested in an alternative jvm language before delving into how alternative jvm languages can be used to support functional programming concepts on the jvm. the chapter outlines different ways to classify non-java jvm languages such as interpreted versus compiled, statically typed versus dynamically typed, and imperative versus functional. the chapter also contrasts completely new languages designed for the jvm (groovy, scala , clojure ) with "reimplementation" languages (pre-existing languages ported to the jvm such as jython , jruby , and rhino ).
chapter 7 provides information on how to decide which alternative jvm language to choose for different situations. the authors quickly introduce the non-java jvm languages that each get a chapter's focus (groovy, scala, and clojure) and explain why they selected these languages upon which to focus.
we’ve picked three languages that we see having the greatest potential longevity and influence. these are the languages on the jvm (groovy, scala, and clojure) that already have well-established mind share among polyglot programmers.
after chapter 7 kicks off part 3 on polygot programming on the jvm, the next three chapters of part 3 each focus on a specific alternative jvm language: chapter 8 ("groovy: java’s dynamic friend"), chapter 9 ("scala: powerful and concise"), and chapter 10 ("clojure: safer programming"). each of these three chapters provides an overview of the respective alternative jvm languages. of course, a single chapter is not sufficient to comprehensively introduce a programming language, so these chapters focus on the strengths of each covered language. they also cover things such as java interoperability (for groovy and clojure) and use contrasting of the languages with java to illustrate language features.part 4 : applying alternative language and new java techniques and tools
part 4 ("crafting the polyglot project") applies information covered earlier in the book to "some of the most common and important techniques in modern software development." three of the four chapters in this part look at modern software development techniques ( test-driven development , building/continuous integration, and rapid web development). the concluding chapter of the fourth part looks at what the future holds for java.
chapter 11 ("test-driven development") introduces tdd, junit , mockito , and scalatest . this chapter also looks at different ways to implement " test doubles " (dummy, stub, fake, mock). chapter 12 ("build and continuous integration") introduces tools maven 3 , jenkins , findbugs , checkstyle , and leiningen (for clojure projects).
chapter 13 ("rapid web development") covers issues with developing web applications using java. it looks at several different popular java web frameworks before focusing specifically on grails (groovy) and compojure (clojure).
chapter 14 ("staying well-grounded") begins with the sentence, "to stay ahead of the curve, the well-grounded java developer should always be aware of what’s coming around the corner." this chapter then looks at the authors' perspective on the future of java. the authors cover java 8 with specific focus on the two most significant features of that version: lambda expressions and jigsaw modularity . the chapter also looks at jvm changes making polygot programming easier and more productive and at improved concurrency support. it ends by looking at other jvm trends.appendices : background / supporting information
besides the four parts with 14 chapters, the well-grounded java developer also includes five appendices: appendix a ("java7developer - source code installation"), appendix b ("glob pattern syntax and examples"), appendix c ("installing alternative jvm languages"), appendix d ("downloading and installing jenkins"), and appendix e ("java7developer - the maven pom"). these appendices provide example code related to the book as well as other useful reference information related to topics covered in the book.the book's audience
the well-grounded java developer hits its goal of being aimed at and primarily beneficial for the java developer who wants to be a "well-grounded java developer." newer java developers can learn much about basic tools, techniques, and approaches in java. moderately experienced java developers are likely to pick up new tools and techniques or to gain a better and deeper understanding of principles about the java language and about the jvm.
most experienced java developers will likely find much to learn from this book, especially if they are too busy developing applications to spend the time trying out three alternative jvm languages along with the new features of java in java 7 and java 8. i know several java developers who i consider very experienced and even they would benefit from some of the low-level details this book provides. for example, the sections on javap and jmap are as good as introductions and concise reference as i've seen for those respective oracle jvm tools.
although i think nearly all java developers can learn new things, new approaches, and new techniques from the well-grounded java developer , i think the book is particularly well-suited for the java developer who feels comfortable with java, but has not had a lot of time in recent years to come up to speed on the popular alternative jvm languages or the features of java 7 and 8 (closures and modularity). this book can provide a quick "tune-up" to bring these experienced java developers up to speed on the latest happenings.disclaimer
it is trendy currently to talk about how "transparent" one is. in an effort to fit in with this trend, i must acknowledge here factors that might be misconstrued as affecting my judgment. first, the authors have kindly included a reference to my blog post on groovy json support in the well-grounded java developer . this is a book that i'm very happy to have my name and my blog associated with and that may prove my opinion of this book more than anything else.
a second potential conflict of interest that one might misconstrue to affect my judgment is author martijn verburg 's ( @karianna ) tweet-out of my twitter handle ( @dustinmarx ). that single tweet increased the number of people "following" me on twitter by several times my previous number. however, i had planned to write this review and had the general gist of it in mind well before this tweet.manning early access program (meap)
i enjoyed having access to portions of the well-grounded java developer earlier than its formal publication via the manning early access program . this is an especially valuable program when the forthcoming book is on subjects that are very new (such as java 7).the downsides
the well-grounded java developer 's primary downsides are related to the fact that it cannot be everything to everyone (nothing can!). the book is great at helping java developers kick-start their efforts at becoming well-grounded. however, as the authors acknowledge multiple times in the book, many of the subjects will require additional reading of other sources for more details on subjects introduced in this book. also, the book cannot possibly cover every "new" thing coming to the world of java. for example, javafx is not mentioned in the book, though the current java.net poll may end up indicating that javafx may not have yet earned enough community-wide respect and acceptance to warrant such a mention.conclusion
i was excited about the prospect of the well-grounded java developer when i initially read about it and it has delivered to a level matching even those high expectations. this is that rare book i'm always on the lookout for that stretches me as a general java developer . many highly-focused and specific java-related books do this for me in one area of java, but this book helped me to learn and realize things in several different aspects of java and the jvm.
i have used java for many years and was a fairly early adopter of java 7. i have also been a huge fan of groovy for a while now and i read and write blogs frequently, but i still found numerous details and insights in this book that i had not thought about previously. i work with many great java developers who spend far less time reading blogs, working with alternative jvm languages, or trying out new features of java and i'd expect them to gain even more useful insights from reading the well-grounded java developer . as dr. heinz kabutz wrote in the book's forward, "studying this book will help you become a well-grounded java developer. not only that, it will give you tips on how to stay well-grounded." this book comes from a great idea and is an example of where a delivered product meets the lofty expectations of the original idea.
Published at DZone with permission of Dustin Marx, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.