small medium large xlarge

Programming Groovy: Dynamic Productivity for the Java Developer


Cover image for Programming Groovy

Programming Groovy

Dynamic Productivity for the Java Developer


Groovy brings you the best of both worlds: a flexible, highly productive, agile, dynamic language that runs on the rich framework of the Java Platform. Groovy preserves the Java semantics and extends the JDK to give you true dynamic language capabilities⎯programming in Groovy feels like you’re using an augmented Java. Programming Groovy will help you learn and take advantage of the latest version of this rich dynamic language, so you can be a more productive Java Platform developer.

Programming Groovy 2 is available here.

Customer Reviews

The book does a great job balancing quick explanations of concepts, code examples, and insights into the implementation of Groovy. Even in chapters on topics I’m familiar with, I found myself impressed with everything Venkat found that I hadn’t seen before.

- Hamlet D'Arcy

Software developer

About this Title

Pages: 320
Published: 2008-04-01
Release: P1.0 (2008-04-07)
ISBN: 978-1-93435-609-8

The strength of Java is no longer in the language itself; it’s in the Java Platform (the JVM, JDK, and rich frameworks and libraries). But recently, the industry has turned to dynamic languages for increased productivity and speed to market.

Groovy is one of a new breed of dynamic languages that run on the Java platform. You can use these new languages on the JVM and intermix them with your existing Java code. You can leverage your Java investments while benefiting from advanced features including true Closures, Meta Programming, the ability to create internal DSLs, and a higher level of abstraction.

If you’re an experienced Java developer, Programming Groovy will help you learn the necessary fundamentals of programming in Groovy. You’ll see how to use Groovy to do advanced programming including using Meta Programming, Builders, Unit Testing with Mock objects, processing XML, working with Databases and creating your own Domain-Specific Languages (DSLs).

Programming Groovy 2.0 is available here.

Contents & Extracts

Full Table of Contents

  1. Preface
  2. Getting Started
  3. Groovy for Java Eyes
  4. Dynamic Typing
  5. Using Closures
  6. Working with Strings
  7. Working with Collections
  8. Exploring the GDK
  9. Working with XML
  10. Working with Databases
  11. Working with Scripts and Classes
  12. Exploring Meta-Object Protocol (MOP)
  13. Intercepting Methods Using MOP
  14. MOP Method Injection and Synthesis
  15. MOPping Up
  16. Unit Testing and Mocking
  17. Groovy Builders
  18. Creating DSLs in Groovy


Venkat Subramaniam, founder of Agile Developer, Inc., has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia. Venkat helps his clients effectively apply and succeed with agile practices on their software projects. He is a frequent invited speaker at international software conferences and user groups. He’s author of .NET Gotchas (O’Reilly) and coauthor of the 2007 Jolt Productivity award-winning book Practices of an Agile Developer (Pragmatic Bookshelf).