Skip to content

General suggestions

EdZilla edited this page Sep 13, 2010 · 8 revisions

I find your book offers more depth than I’ve seen elsewhere. A great addition (you may already have planned it) would be to have an appendix or late chapter describing the bootstrap process at run-time, especially what happens under the hood – even if at a high level – as to e.g. when/how dynamic finders are created, services, scaffolding etc..This would help those who need to do extra configuration or want to develop.


Suggest including a basic db creation, user, grant section

That is, a simple howto create a database, users and grant permissions for both MySQL and Postgresql.

for example (from Jason Rudolph’s excellent “Grails Getting Started”)


racetrack> mysql -u root -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.

mysql> create database racetrack_dev;

mysql> create database racetrack_test;

mysql> create database racetrack_prod;

mysql> grant all on racetrack_dev.* to
’jason’@’localhost’ identified by ’’;

Suggest including some basic database backup/restore commands

I suggest a short section on the commands used to dump and restore would be handy for newbies and the rest of us:


Dump:
mysqldump my_db_name -u root -p > my_db_name.sql

Restore:
mysql my_db_name < my_db_name-1-9-2009.sql -u root -p

I’m familiar with using mysqldump to backup my databases, and on occasion using the dump to seed a dabase if I’m testing something.

I don’t think it’s too far out of scope for the book, do you?


Suggest including a postgresql dump file along with the hubbub source

it’d be nice to have an sql file the readers could load to see a fully working and data populated app.

Since the example hubbub app from github had a “real” postgres db specified in the test env, to get the example hubbub source to pass grails test-app, I copied the development datasource closure (uses hsqldb) to the test env in DataSource.groovy, which seemed a little backwards to me but worked.


Suggest clearly explaining the counter intuitive default join table mapping, and the new Grails 1.1 Many-to-Many overhaul syntax

I believe this is an area where there is consistent misunderstanding and a clear well presented discussion of the problem (with diagrams) will go a long way in terms of the value of your book.

Apparently the mapping was intentional, but counter-intuitive. The Overhaul is intended to fix the problem.

“many-to-many obviously stores relations in wrong columns”

http://jira.codehaus.org/browse/GRAILS-828
The above discussion is between Graeme and Martin Van Dijken. Graeme explains the intentional though counter-intuitive state of affairs. Martin explains the mapping workaround.

“Many to Many GORM join table issue”

http://www.nabble.com/Many-to-Many-GORM-join-table-issue-td17258858.html

The above discussion Bert Beckwith explains how the state can be re-reversed.

“Many-to-Many Overhaul”
http://jira.codehaus.org/browse/GRAILS-2580