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 Groovy 2.0 will help you, the experienced Java developer, learn and take advantage of the latest version of this rich dynamic language. You’ll go from the basics of Groovy to the latest advances in the language, including options for type checking, tail-call and memoization optimizations, compile time metaprogramming, and fluent interfaces to create DSLs.
Buy Now
This title is currently available in Beta. Buy the eBook now, and you'll be able to download successive releases of the eBook as the authors add material and correct mistakes. You'll get the final eBook when the book is finished.
If you buy the combo pack (Beta eBook + finished Paper Book) now, you'll get the Beta eBook immediately. You'll get the finished paper book when it's released (we're currently estimating 2013-06-10, but these dates can change).
About this Book
- 350 pages (est)
- Published:
- Release: B2.0 (2013-03-18)
- ISBN: 978-1-93778-530-7
The strength of Java is no longer in the language. It’s in the Java Platform—the JVM, JDK, and rich frameworks and libraries. You don’t have to leave the rich Java Platform to take advantage of dynamic languages such as Groovy. Groovy preserves the Java semantics and extends the JDK, so programming in Groovy feels like the Java language has been augmented; it’s like working with a lighter, more elegant Java. If you’re an experienced Java developer who wants to learn how Groovy works, you’ll find exactly what you need in this book.
You’ll start with the fundamentals of programming in Groovy and how it works with Java, and then you’ll explore advanced concepts such as unit testing with mock objects, using Builders, working with databases and XML, and creating DSLs.
This book will help you quickly learn the new features in Groovy 2 so you can readily apply them on your next project. In addition, you’ll master Groovy’s powerful yet complex run-time and compile-time metaprogramming features. Everything’s up to date and waiting for you to dig in!
What You Need
To work on the examples in the book you need Groovy 2.0.5 and Java JDK 5 or higher.
Contents and Extracts
This book is currently in beta, so the contents and extracts will change as the book is developed.
Full Table of Contents- Introduction
- Getting Started
- Groovy for Java Eyes excerpt
- Dynamic Typing
- Using Closures excerpt
- Working with Strings
- Working with Collections
- Exploring the GDK
- Working with XML
- Working with Databases
- Working with Scripts and Classes
- Exploring Meta-Object Protocol (MOP) excerpt
- Intercepting Methods Using MOP
- MOP Method Injection
- MOP Method Synthesis
- MOPping Up
- Applying Compile Time Metaprogramming
- Groovy Builders
- Unit Testing and Mocking
- Creating DSLs in Groovy


