Groovy in Action

ClanBrandon Books
view more info on this item
click here for more details, find new or used items

Dierk Koenig, Andrew Glover, Paul King, Guillaume Laforge, Jon Skeet

Our price £21.59 (£35.99)
New from £16.64
Used from £17.08

Pages: 696 (Paperback)

ISBN: 1932394842

Pub: Manning Publications

Pub date: 2007-01-17

Amazon.co.uk Sales Rank: 89033

Check for 3rd party sellers (new/used)

Reader Reviews:


5/5 stars

Cracking stuff (3/3 people found this helpful)

Whatever you think about the merits of Groovy as a language, a serious contender on the JVM, or a complete mess, you couldn't hope to find a better advocate for Groovy than this book.

One of the secrets of GinA's success is that it assumes the reader is already proficient with Java development, including Swing, Ant and JUnit. It would also help to know about XML, SQL, HTML, JSP and a vague idea of how MVC applies to web apps. You don't need to be an expert in these areas, though. If you've sufficient knowledge to decode the preceeding alphabet soup of initialisations, you'll be ok.

The reward for possessing this background knowledge is that GinA doesn't waste time with trivial examples, and barrels through Groovy the language in the first part, leveraging your existing knowledge of Java to highlight the important differences in Groovy. In particular, the advantages of interpolating strings, simple hash and array construction syntax, optional typing and metaprogramming are stressed. The big win in Groovy over Java is the use of closures and their used in a block-based approach to iteration, which is as well motivated here as the material in, say, The Pickaxe is for Ruby.

The second part of the book provides examples of the Groovy library. It begins with an excellent chapter on Groovy's Builders, which provide a very neat, uncluttered syntax for putting together hierarchical structures. An obvious application is XML, and by extension Ant scripts, which appears to have some major advantages compared to the challenging readability of vanilla Ant. Even more impressive is the SwingBuilder example, which builds a GUI with the minimum of fuss and a complete lack of anonymous inner classes.

Beyond the Builders, there are also compelling chapters on templating HTML and server side Groovy (Groovlets), writing DAOs and DTOs in Groovy to simplify database programming, and a chapter on XML, which even manages to find the space to introduce Groovy for SOAP, XML-RPC and REST web services.

The final part of the book describes some non-core libraries and other applications of Groovy. The chapter on Groovy extensions to JUnit is interesting, although perhaps this is one place where it assumes too little on behalf of the reader. I would have assumed that the average developer sufficiently motivated to pick up a book on Groovy knows enough about unit testing and JUnit that more space could have been given to the advanced topics. Particularly appealing is the idea of testing Java code with dynamically typed Groovy unit tests, which would make mocking and stubbing more palatable; I would have liked more on that subject.

Another noteworthy chapter is the last one, which introduces the web app framework Grails. This has a different style to the other chapters, being a dialogue between two of the authors as they build a simple app. This reader admits to finding it a little bit naff, but it does usefully demonstrate the grails way (which is a lot like Rails).

If you have the slightest interest in Groovy, alternatives to Java on the JVM, or dynamic languages, GinA makes the perfect case for Groovy as a first class integration language for all the bits of Java where you really wish you were working with something like Perl, Ruby or Python. It's well-written, with good examples, clear explanations, and it's relentlessly practical, never forgetting its target audience. It's all the more impressive given lead author Dierk Konig's comment in the preface that English is not his first language. Kudos to him and his co-authors for what they've delivered.

One can only wish that every language had its GinA. Outstanding.

4/5 stars

An excellent book for both old and new (4/4 people found this helpful)

The book is well presented, well written; moreover, the examples and instructions WORK. The authors have a very easy-going style, and you find yourself having a lot of fun (my favourite is the Grails example in the back, got me interested enough to rework a new project to use Grails+Groovy instead of my usual Delphi/PHP for web services).
The guys did an incredible job.

My only gripe (and the reason for the 4star rating); the Index is terrible.
Maybe it's just me, but if I'm looking for details on something specific (eg String Objects), I expect to get at least a bit of detail when I turn to the page identified in the index - instead of just finding the word String in italics on the page.
I'm not really familiar with how these things are done, but I would suggest fixing this in the next release of this book.

Similar Products

The Definitive Guide to Grails (Expert's Voice in Java)

Spring in Action

Java Concurrency in Practice

RESTful Web Services

Java Persistence with Hibernate

Categories

Amazon.co.uk places this book into the following categories:

Books -> Subjects -> Computing & Internet -> General
Books -> Subjects -> Computing & Internet -> Databases -> Java & Databases
Books -> Subjects -> Computing & Internet -> Programming -> Languages -> Java -> XML
Books -> Subjects -> Computing & Internet -> Programming -> Languages -> Java -> Web Services
Books -> Subjects -> Computing & Internet -> Programming -> General AAS
Books -> Subjects -> Computing & Internet -> Programming -> Languages & Tools -> General AAS
Books -> Subjects -> Computing & Internet -> Digital Lifestyle -> Online Shopping -> Amazon
Books -> Subjects -> Computing & Internet -> Digital Lifestyle -> Online Shopping -> General AAS
Books -> Subjects -> Computing & Internet -> General AAS
Books -> Subjects -> Computing & Internet -> Software & Graphics -> General AAS
Books -> Subjects -> Study Books -> FE & College -> Vocational -> Sport & Recreation
Books -> Refinements -> Language (feature_browse-bin) -> English
Books -> Refinements -> Age (feature_two_browse-bin)
Books -> Refinements -> Format (binding_browse-bin) -> Paperback
Books -> Refinements -> Condition (condition-type)

 

ClanBrandon Books | Prague airport transfer | Dreamweaver | Short Term Missions | English Teacher Jobs in the Czech Republic
Czech Republic | Operation Mobilisation | Czech Republic Map