G2One Inc - The Groovy/Grails
company - and the Grails development team are pleased to announce the
1.0 of the Grails web-application development framework.
Grails is a dynamic web-application framework built in Java and
Groovy, leveraging best of breed APIs from the Java EE sphere including
Spring, Hibernate and SiteMesh. Grails brings to Java and Groovy
developers the joys of convention-based rapid development while
allowing them to leverage their existing knowledge and capitalize on
the proven and performant APIs Java developers have been using for
years.
Thank you to all the team members, patch contributors and users.
Grails 1.0 has been 2 years and 8 months in the making, and many have
contributed to what is a fantastic milestone.
Grails 1.0 RC1 introduces an Object Relational Mapping (ORM) Domain
Specific Language (DSL) that reduces the need to fallback to
traditional Hibernate mapping. The DSL allows customization of the
following aspects:
Table and column names
Inheritance strategy
Second-level cache configuration
Id generation strategy
Composide Id support
Eager/Lazy loading
Database indices
Custom Hibernate user types
Example:
class Person { String firstName static hasMany = [addresses:Address] static mapping = { table 'people' version false id column:'person_id' columns { firstName column:'First_Name' addresses lazy:false } } } class Address { String street String postCode }
Grails has up until now supported interceptors that can be used
within controllers. Filters however offer a more powerful way of
defining cross cutting concerns.
Filters can be applied to an entire controller, only specific actions or entire URI spaces. Example:
Grails now supports content negotiation via the Accept/Content-Type
HTTP headers, a parameter or URI extensions. Mime types can be
configured in Config.groovy: