Tim Bray: In the mail from O���Reilly this week, Groovy in Action [...]
[...] and of course, watching Groovy at work. I have to say the source code is real easy to read; oddly, what it makes me wish for is regex literals in Java. Hmm, it���s not obvious to the casual eye when you declare variables and when you don���t; I���m sympathetic to the optional-declaration idea though. I guess I���ll have to have a look at the book; it was cracking the Pickaxe book���s covers that dropped me onto the slippery Ruby slope.
I received my copy of Groovy In Action 8 days ago. No, it was not O'Reilly who sent it. It was Amazon.com. And it's not a free copy either. I pre-paid for it, months ago.
And I haven't put it down since I received it. Sure, Java Generics and Collections is deep and fascinating, Groovy in Action is simply magnetic. The last time I read a book through like this, the book was Hibernate In Action.
I have been an advocate for dynamic languages for the Java platform for a long time now. See for example, my Scripting Languages for Java article from 2168 days ago. (That's six years ago, folks.) While my favorite scripting languages for Java remains to be Rhino and Jython, I keep and open mind for the newer entries to the field like Groovy and JRuby.
Without passing judgement on the language itself, here's my (re)view of the book:
The figure on the cover of the book is pretty and beautifully dressed (you can't say this for some of the other Manning titles)
The text is written in a conversational voice, reading it is like sitting in a classroom listening to an instructor
Part 1 (The Groovy Language, pp. 1–225) covers the language in a non-hurried pace, with each feature thoroughly treated, and similarities and contrasts with Java pointed out along the way
The authors are not shy about pointing out potential problem spots in the language (for example that switch statements may have overlapping cases so the order of the case clauses matter in Groovy, just like the order of the catch clauses matter in Java)
The authors are not avert to explaining in excrutiating detail how some of the more magical features work under the covers. When they are done, you say, "Well of course, that's how closures work."
Part 2 (Around The Groovy Library, pp. 227–449) covers builders, the GDK, database programming, integration, and working with XML
Part 3 (Everyday Groovy, pp. 451–605) covers tips and tricks, unit testing, Groovy on Windows, and Grails
Four appendices rounds out the book: Installation and documentation, language info, GDK API quick reference, and cheat sheets
All-in-all, I think Groovy in Action is among the top five Manning books. For me personally, it's also a perception changing and influential book. The $49.99US price tag is a little bit too expensive for a "scripting" language. But I bet the Manning folks and the Groovy people have better designs for the Groovy language.
I highly recommend Groovy in Action for Java developers who want to learn Groovy in a systematic way and who are starting Groovy projects.
And if I can get the attention of the Manning folks and Groovy people, for just a second, I would whisper the following into their ears: "Make this book freely available, à laThe Java Lanuage Specification. Groovy deserve it!"