Prerequisits
You can get all the scaffold templates with the command "grails install-templates". Edit src/templates/scaffolding/Controller.groovy similarly to this tutorial. To see the end result, generate the resulting code: "grails generate-controller Person"
NOTE: When editing a template, the code generated from the template can block the newly generation and cause errors you were not expecting!
Time for some fun
When you've got the scaffolding in place;
- create a simple domain model in Groovy + Grails syntactic sugar (one-to-many relations)
- create controllers for each domain class you want to expose. Use automatic scaffolding as much as possible
- no need for an additional bulletpoint, thats all there is to it
The RFID-Server source code uses this approach
This comment has been removed by a blog administrator.
ReplyDelete