Groovy in Action (second edition)
Last update: 04 Sep 2022
Groovy in Action Second Edition
Authors: Dierk König, Paul Kink
ISBN: 9781935182443
Publisher: Manning Publications Co.
Year: 2015
A must-have for any serious Groovy developer.
Update: the book refers to Groovy version 2.x. The latest Groovy version is 4.x. Nevertheless, the book contents are still fully valid.
Groovy in Action (Second Edition) is, at the same time, a detailed overview of the language and core libraries' characteristics and an in-depth description of how it works.
The first part is dedicated to the language, with the usual list of syntax elements descriptions (operators, data structures, control structures..), including Groovy unique features like being together a dynamic and a static typing language or supporting both object-oriented and functional programming styles, not mentioning the scripting capabilities.
The second part is devoted to the Groovy core library: the Groovy Design Kit, how to work with databases and web services and how to handle JSON and XML.
The final part is dedicated to unit testing, concurrency and, of course, domain-specific languages, one of the traditional Groovy applications areas.
I have found very interesting chapter 16 on how to integrate Groovy in a Java application, using, for example, Groovy as a dynamic business rules engine, and chapter 20 on the Groovy ecosystem (Gradle, Grails..) introduction.
The authors show not only a very strong knowledge of the language and its ecosystem but also an understanding of how Groovy fits in real-world applications. Very interesting and useful the adoption of the assertions statements to better explain the code examples.
This book, with 900+ pages, is not targeting occasional Groovy users but I think it is a must-have (as an introduction at the beginning, as a reference later) for anybody intended to seriously use Groovy.