advantage of Groovy, a dynamic language for the JVM • Built on JEE, Spring, Hibernate and other popular libraries/frameworks you love (or hate) • Turbo-Charging Existing Development Knowledge • Current Version: 1.3.2
- Extension to Hibernate • Dynamic Finders: Blog.findByTitleLike, Blog.findByDateCreatedBetween(x, y) • Criteria DSL • HQL: Blog.findAll(„from Blog b where b.title like ?“, [title]) • GSPs, Tag Libraries, Filters • Grails provides configuration DSLs for Spring, Log4J, DataSource, WebFlow, etc. • Environments: development, test, production
made or modified by a human“ • important Grails Artefacts: Domain Classes, Services, Controllers • subfolders: domain, controllers, services • each Grails artefact has a distinguished artefact handler • command line tools: create-domain-class, create-service, create-controller • Plugins might register other Grails artefacts: e.g. Quartz registers the „job“ artefact
MOP, makes building custom DSLs super easy! • Meta Object Protocol • adaptable runtime behavior through the metaClass property • GroovyObject, ExpandoMetaClass, custom MetaClass, Categories, ... • methodMissing/propertyMissing • Support for compile-time meta-programming: AST transformations
plugin ecosystem • component modularization with versioning out-of-the-box • Groovy, a real dynamic programming language, kicks ass • built on top of Spring Framework and Hibernate • GORM saves a lot of DAOs • Testing using a dynamic programming language is fun • Reuse existing Spring/Hibernate artefacts (resources.xml, *.hbm.xml, etc.)
support for pre-/postconditions, class invariants • class invariants inheritance • pre-/postcondition inheritance • old and result variable in postcondition expressions