Groovy in Action, Second Edition is a thoroughly revised, comprehensive guide to Groovy programming. It introduces Java developers to the dynamic features that Groovy provides, and shows how to apply Groovy to a range of tasks including building new apps, integration with existing code, and more » DSL development. Covers Groovy 2.4.
About the Technology
In the last ten years, Groovy has become an integral part of a Java developer's toolbox. Its comfortable, common-sense design, seamless integration with Java, and rich ecosystem that includes the Grails web framework, the Gradle build system, and Spock testing platform have created a large Groovy community
About the Book
Groovy in Action, Second Edition is the undisputed definitive reference on the Groovy language. Written by core members of the Groovy language team, this book presents Groovy like no other can—from the inside out. With relevant examples, careful explanations of Groovy's key concepts and features, and insightful coverage of how to use Groovy in-production tasks, including building new applications, integration with existing code, and DSL development, this is the only book you'll need. Updated for Groovy 2.4.
Some experience with Java or another programming language is helpful. No Groovy experience is assumed.
* Comprehensive coverage of Groovy 2.4 including language features, libraries, and AST transformations
* Dynamic, static, and extensible typing
* Concurrency: actors, data parallelism, and dataflow
* Applying Groovy: Java integration, XML, SQL, testing, and domain-specific language support
* Hundreds of reusable examples
About the Authors
Authors Dierk König, Paul King, Guillaume Laforge, Hamlet D'Arcy, Cédric Champeau, Erik Pragt, and Jon Skeet are intimately involved in the creation and ongoing development of the Groovy language and its ecosystem.
Table of Contents
1. PART 1 THE GROOVY LANGUAGE
2. Your way to Groovy
3. Overture: Groovy basics
4. Simple Groovy datatypes
5. Collective Groovy datatypes
6. Working with closures
7. Groovy control structures
8. Object orientation, Groovy style
9. Dynamic programming with Groovy
10. Compile-time metaprogramming and AST transformations
11. Groovy as a static language
12. PART 2 AROUND THE GROOVY LIBRARY
13. Working with builders
14. Working with the GDK
15. Database programming with Groovy
16. Working with XML and JSON
17. Interacting with Web Services
18. Integrating Groovy
19. PART 3 APPLIED GROOVY
20. Unit testing with Groovy
21. Concurrent Groovy with GPars
22. Domain-specific languages
23. The Groovy ecosystem « less
Gradle in Action is a comprehensive guide to end-to-end project automation with Gradle. Starting with the basics, this practical, easy-to-read book discusses how to establish an effective build process for a full-fledged, real-world project. Along the way, it covers advanced topics like testing, continuous more » integration, and monitoring code quality. You'll also explore tasks like setting up your target environment and deploying your software.
The book assumes a basic background in Java, but no knowledge of Groovy. « less
Customizing Next-Generation Builds
If you're familiar with Gradle's basics elements - possibly through the author's previous O'Reilly book, Building and Testing with Gradle - this more advanced guide provides the recipes, techniques, and syntax to help you master this build automation tool. With clear, concise explanations and lots of more » ready-to-use code examples, you'll explore four discrete areas of Gradle functionality: file operations, custom Gradle plugins, build lifecycle hooks, and dependency management.
Learn how to use Gradle's rich set of APIs and Groovy-based Domain Specific Language to customize build software that actually conforms to your product. By using the techniques in this book, you'll be able to write domain-specific builds that support every other line of code your team creates. « less
Grails is a full-stack web development framework that enables you to build complete web applications in a fraction of the time and with less code than other frameworks. Grails uses the principle of convention over configuration and the dynamic Groovy programming language.
This revised and updated new more » edition shows you how to use Grails by iteratively building a unique, working application. By the time you're done, you'll have built and deployed a real, functioning website. Using this hands-on, pragmatic approach, you'll explore topics such as Ajax in Grails, custom tags, and plugins. You'll dig into Grails' powerful view technology, Groovy Server Pages, and see how you can easily leverage the help offered by scaffolding to create custom user interfaces faster than you would have thought possible. Along the way, you'll learn about domain classes, controllers, and GSP views. And you'll see how Grails enables you to use powerful frameworks such as Spring and Hibernate. « less
Over 90 recipes that provide solutions to everyday programming challenges using the powerful features of Groovy 2
Get up to speed with Groovy, a language for the Java Virtual Machine (JVM) that integrates features of both object-oriented and functional programming. This book will show you the powerful features of Groovy 2 applied to real-world scenarios and how the dynamic nature of the language makes it very simple more » to tackle problems that would otherwise require hours or days of research and implementation.
Groovy 2 Cookbook contains a vast number of recipes covering many facets of today's programming landscape. From language-specific topics such as closures and metaprogramming, to more advanced applications of Groovy flexibility such as DSL and testing techniques, this book gives you quick solutions to everyday problems. « less
Empower yourself to automate your build
Create Gradle build scripts from clear examples. Write build logic with the Gradle build language. Compile, test and check your Java, Scala and Groovy applications. Write your own custom tasks and plugins. Use Gradle on continous integrations servers Jenkins, TeamCity and Bamboo. Integrate Gradle with more » Eclipse and IntelliJ IDEA. « less
Grails is a Java- and Groovy-based web framework that is built for speed. First-time developers are amazed at how quickly you can get a page-centric MVC web site up and running thanks to the scaffolding and convention over configuration that Grails provides. Advanced web developers are often pleasantly more » surprised at how easy it is to leverage their existing Spring and Hibernate experience. "Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, Tropicana, and Taco Bell are all using Grails. Are you ready to get started as well? « less
A Quick-Start Guide
Java web development is notoriously tedious, but help is on the way: Grails. Using the principle of convention-over-configuration and the dynamic Groovy programming language, Grails takes the pain out of web development and brings back the fun. This book will get you up and running with Grails by putting more » it to use in constructing an original, working application from start to finish. « less
Greasing the Wheels of Java
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, more » 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. « less