Table of Contents

 

Copyright

Brief Table of Contents

Table of Contents

Foreword

Preface

Acknowledgments

About this Book

About the Cover Illustration

1. Up to speed with Groovy

Chapter 1. Why add Groovy to Java?

1.1. Issues with Java

1.1.1. Is static typing a bug or a feature?

1.1.2. Methods must be in a class, even if you don’t need or want one

1.1.3. Java is overly verbose

1.1.4. Groovy makes testing Java much easier

1.1.5. Groovy tools simplify your build

1.2. Groovy features that help Java

1.3. Java use cases and how Groovy helps

1.3.1. Spring framework support for Groovy

1.3.2. Simplified database access

1.3.3. Building and accessing web services

1.3.4. Web application enhancements

1.4. Summary

Chapter 2. Groovy by example

2.1. Hello, Groovy

2.2. Accessing Google Chart Tools

2.2.1. Assembling the URL with query string

2.2.2. Transmitting the URL

2.2.3. Creating a UI with SwingBuilder

2.3. Groovy Baseball

2.3.1. Database data and Plain Old Groovy Objects

2.3.2. Parsing XML

2.3.3. HTML builders and groovlets

2.4. Summary

Chapter 3. Code-level integration

3.1. Integrating Java with other languages

3.2. Executing Groovy scripts from Java

3.2.1. Using JSR223 scripting for the Java Platform API

3.2.2. Working with the Groovy Eval class

3.2.3. Working with the GroovyShell class

3.2.4. Calling Groovy from Java the easy way

3.2.5. Calling Java from Groovy

3.3. Summary

Chapter 4. Using Groovy features in Java

4.1. Treating POJOs like POGOs