Taking Control of Our Domain
The next step in implementing our first features is to give our users a way to create TekEvent instances. To do this, we will need a controller class. Controller classes are the dispatchers of a Grails application. All requests from the browser come through a controller. We will do quite a bit of work with controller classes later, but for now all we need is a blank one. Once again, Grails has a script to produce this:
| | $ grails create-controller com.tekdays.TekEvent |
This will create the files grails-app/controllers/com/tekdays/TekEventController.groovy and test/unit/com/tekdays/TekEventControllerSpec.groovy,[19] along with a folder for views (this folder will be empty to begin with). Let’s open the TekEventController ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access