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 ...

Get Groovy for Domain-specific Languages - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.