O'Reilly logo

Grails 2: A Quick-Start Guide by Ben Klein, Dave Klein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Domain Class

The heart of a Grails application is its domain model, that is, the set of domain classes and their relationships.

A domain class represents persistent data and, by default, is used to create a table in a database. We’ll talk more about this shortly when we create our first domain class. For creating domain classes, Grails provides a convenience script called (unsurprisingly)[15] create-domain-class.

Just as the domain model is the heart of a Grails application, the TekEvent class will be the heart of the TekDays domain model. TekEvent is the name of the class that we will use to represent an event (or conference or code camp or tech fest). If we were to sit down and put our heads together to come up with a design ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required