- 370 pages
- English
- ePUB (mobile friendly)
- Only available on web
About This Book
You don't have to leave the rich Java Platform to take advantage of Groovy. Groovy preserves Java's 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. You'll master Groovy's powerful yet complex run-time and compile-time metaprogramming features.
Much has evolved in the Groovy language since the publication of the first edition of Programming Groovy. Programming Groovy 2 will help you learn and apply Groovy's new features. Creating DSLs is easier now, and Groovy's already-powerful metaprogramming facilities have improved even more. You'll see how to work with closures, including tail call optimization and memoization. The book also covers Groovy's new static compilation feature.
Whether you're learning the basics of the language or interested in getting proficient with the new features, Programming Groovy 2 has you covered.
Frequently asked questions
Information
Table of contents
- Programming Groovy 2
- â
- Table of Contents
- What readers are saying about Programming Groovy 2
- Foreword to the Second Edition
- Introduction
- Part 1: Beginning Groovy
- Chapter 1: Getting Started
- Chapter 2: Groovy for Java Eyes
- Chapter 3: Dynamic Typing
- Chapter 4: Using Closures
- Chapter 5: Working with Strings
- Chapter 6: Working with Collections
- Part 2: Using Groovy
- Chapter 7: Exploring the GDK
- Chapter 8: Working with XML
- Chapter 9: Working with Databases
- Chapter 10: Working with Scripts and Classes
- Part 3: MOPping Groovy
- Chapter 11: Exploring Metaobject Protocol (MOP)
- Chapter 12: Intercepting Methods Using MOP
- Chapter 13: MOP Method Injection
- Chapter 14: MOP Method Synthesis
- Chapter 15: MOPping Up
- Chapter 16: Applying Compile-Time Metaprogramming
- Part 4: Using Metaprogramming
- Chapter 17: Groovy Builders
- Chapter 18: Unit Testing and Mocking
- Chapter 19: Creating DSLs in Groovy
- Appendix 1: Web Resources
- Appendix 2: Bibliography