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.

Out of Print

This book is currently out of print.

About this Book

  • 320 pages
  • Published:
  • 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 and 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

About the Author

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).

Upcoming Author Events

  • 2013-01-08: Venkat Subramaniam
    Integrating Groovy and Java (Boulder JUG)
  • 2013-01-09: Venkat Subramaniam
    "Integrating Groovy and Java" and "Design Patterns in Modern JVM Languages" (Denver JUG)
  • 2013-01-15: Venkat Subramaniam
    Scala for the Intrigued (Atlanta JUG)
  • 2013-02-04: Venkat Subramaniam
    Workshops and talks on Functional Programming and JVM related languages. (JFokus - Sweden)
  • 2013-02-18: Venkat Subramaniam
    Talks on Java 8 and also CoffeeScript. (DevNexus - Atlanta)
  • 2013-02-26: Venkat Subramaniam
    Workshop and talks on Agile technical practices. (Agile India - Bangalore)
  • 2013-03-04: Venkat Subramaniam
    An opportunity to hang out with fellow speakers. (SpeakerConf - Aruba)
  • 2013-03-08: Venkat Subramaniam
    Talks on HTML 5 and JVM languages. (NFJS - Minneapolis, MN)
  • 2013-03-13: Venkat Subramaniam
    Various JVM languages related topics. (33degree - Warsaw, Poland)
  • 2013-04-04: Venkat Subramaniam
    JavaScript related topic (DenverJS - Denver, CO)
  • 2013-04-05: Venkat Subramaniam
    Talks on HTML 5 and JVM languages. (NFJS, NYC)
  • 2013-04-21: Venkat Subramaniam
    Talks on HTML 5 and JVM languages. (NFJS, Reston, VA)
  • 2013-05-03: Venkat Subramaniam
    Talks on JVM related languages (NFJS, Charlotte, NC)
  • 2013-05-07: Venkat Subramaniam
    Workshops and talks on various topics (Great Indian Developer Summit, Bangalore)
  • 2013-05-14: Venkat Subramaniam
    Scala for the Intrigued (JUG, San Francisco, CA)
  • 2013-05-17: Venkat Subramaniam
    Various topics related to JVM and HTML5 (NFJS, Dallas, TX)
  • 2013-05-22: Venkat Subramaniam
    Talks on various topics related to Groovy and the JVM. (GR8Conf, Copenhagen)
  • 2013-06-05: Venkat Subramaniam
    Various topics related to Java and architecture (Software Architecture Summit, Berlin)
  • 2013-06-12: Venkat Subramaniam
    Talks on various topics (NDC Oslo)
  • 2013-07-16: Venkat Subramaniam
    Workshops and talks on various topics. (ÜberConf)
  • 2014-02-24: Venkat Subramaniam
    Speaking about Groovy, Humane interfaces, Patterns. (DevNexus—Atlanta)
  • 2014-02-28: Venkat Subramaniam
    Speaking on various technologies including NoSql, Java 8, HTML 5, Reactive programming, JavaScript (NFJS—Boston)
  • 2014-03-07: Venkat Subramaniam
    Speaking on various technologies including NoSql, Java 8, HTML 5, Reactive programming, JavaScript (NFJS—Minneapolis)
  • 2014-04-22: Venkat Subramaniam
    Speaking about various languages and tools. (GIDS—Bangalore)

Comments and Reviews

  • Hamlet D'Arcy said:

    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.

    Software developer