Book Image

Groovy for Domain-Specific Languages, Second Edition

By : Fergal Dearle
Book Image

Groovy for Domain-Specific Languages, Second Edition

By: Fergal Dearle

Overview of this book

Table of Contents (20 chapters)
Groovy for Domain-specific Languages Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Introduction to DSLs and Groovy
Index

Chapter 9. Existing Groovy DSLs

By now, we have covered a lot of ground in describing the DSL-enabling features of Groovy. In this chapter, we will look at two of the existing Groovy DSLs that are freely available for download. The purpose of this chapter is not to try to give a comprehensive tutorial on either of them. We will explore each in turn in order to understand how they work, but more importantly, we will go through them in order to understand how they are implemented using the Groovy features and techniques that we have covered in the book so far. In this chapter, we will discuss:

  • Grails object relational mapping (GORM), which is a core component of the Grails web application framework and uses DSL-style techniques to apply persistence to regular Groovy classes. We will be looking at how GORM decorates regular POGO classes to add persistence semantics to them.

  • Spock, which is a behavior-driven development (BDD) tool. We have already encountered Spock throughout the book. In this...