small medium large xlarge

Groovy Recipes: Greasing the Wheels of Java


Groovy Recipes

Greasing the Wheels of Java


Cover image for Groovy Recipes
Pages 264
Release P1.0 (2008-02-20)
ISBN 978-0-9787-3929-4

If you’re a busy Java professional who needs quick solutions to everyday problems, then Groovy Recipes is for you. The Groovy language and Grails web framework give you seamless integration with your legacy Java code while adding the flexibility and dynamism of a scripting language and giving you modern, agile, time-saving techniques. Groovy allows you to write code the way you always thought you should—you’ll never look at Java the same way again.

About This Title

Each recipe in Groovy Recipes begins with a concise code example for a quick start, followed by in-depth explanation in plain English. These recipes will get you to-to-speed in a Groovy environment quickly.

You’ll see how to speed up nearly every aspect of the development process using Groovy. Groovy makes mundane file management tasks like copying and renaming files trivial. Reading and writing XML has never been easier with XmlParsers and XmlBuilders. Breathe new life into Arrays, Maps, and Lists with a number of convenience methods. But Groovy does more than just ease traditional Java development: it brings modern programming features to the Java platform like closures, duck-typing, and metaprogramming.

As an added bonus, this book also covers Grails. You’ll be amazed at how quickly you can have a first-class web application up and running from ground zero. Grails includes everything you need in a single zip file⎯a web server (Jetty), a database (HSQLDB), Spring, Hibernate, even a Groovy version of Ant called GANT. We cover everything from getting a basic website in place to advanced features that take you beyond HTML into the world of Web Services: REST, JSON, Atom, Podcasting, and much, much more.

Read the reviews .


Each of our books has its own dedicated discussion area, where readers help each other out. Many authors also choose to drop by.

Join in…

Here are some recent topics:

Contents & Extracts

Full Table of Contents
  • Preface
  • Introduction
  • Getting Started
  • New to Groovy
  • Java and Groovy Integration
  • Groovy from the Command Line
  • File Tricks
  • Parsing XML
  • Writing XML
  • Web Services
  • Metaprogramming
  • Working with Grails
  • Grails and Web Services

Brought to You By

Scott Davis is the Editor in Chief of He is also an author and independent consultant. He is passionate about open source solutions and agile development. He has worked on a variety of Java platforms, from JEE to JSE to JME (sometimes all on the same project).

He is the author of Google Maps API (Pragmatic Bookshelf) and GIS for Web Developers: Adding Where to Your Web Applications (Pragmatic Bookshelf), and co-author of JBoss At Work (O’Reilly).