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

Summary


In this chapter, we looked at two existing Groovy DSLs that are in current use and are free to download. GORM implements a full persistence layer over Hibernate that layers over standard Groovy classes. GORM allows us to decorate a regular POGO with settings for applying the most common associations and relationships that we can expect in our object models.

Much of what GORM provides in terms of querying via dynamic finders requires a Groovy-knowledgeable developer to appreciate and use them. However, the basic object modeling semantics provided through the belongsTo, hasMany, and other persistence settings could be used quite readily by a data-modeling architect who has little or no knowledge of the Groovy language. The domain classes can be viewed as an independent model specification language, which has the advantage of being immediately usable by Groovy developers responsible for other parts of the system.

Spock brings BDD style specification-based testing to the Java/Groovy platform...