In this chapter, we’ve covered some of the fundamentals for developing a web application using Groovy and Grails. Grails provides an interesting contrast to the topics covered in the previous chapters. Although based firmly on Spring and Hibernate, Grails utilizes Active Record as an alternative to the DAO design pattern. This approach is more practical in Grails due to its use of the dynamic language Groovy, allowing new behavior and methods to be dynamically defined. Through the use of convention-over-configuration, Grails can significantly reduce the amount of effort required to get a working application up and running.
Despite some of these differences, Spring’s profound influence is clearly present, and most of the lessons and patterns utilized with other persistence frameworks can still be applied to Grails. You’ve seen how some of the fundamental Spring concepts, such as dependency injection, can be further enhanced through Groovy-based configuration and implicit, convention-based wiring.
KeywordsDomain Model Domain Class Person Class Domain Entity Spring Application
Unable to display preview. Download preview PDF.