addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [qldjvm] CV in Grails

From: Gavin K.
Sent on: Tuesday, August 9, 2011 10:17 AM
Hi Rob,

I had the same goals and am running a project using generate-all to keep up with domain changes.
To prevent the custom pages being overwritten I manually added 'Detailed to the customised Controller and View folder names.
See the Grails section here:
and the code here:

This allowed me to change the domain, generate-all and view the diff to learn.

To be honest in the long run this strategy was a pain and I would not do it again.
 - It created lots of longer variable names and editing.
 - Was slow since I kept running generate-all on several domain classes.
 - The actual live controllers are the 'Detailed ones.
   (it may be possible to reverse this by editing where the templates generate to but I have not tried.)
 - Wasted memory since I doubled up on almost all controllers and views (I'm pruning out the generated ones to lighten).
 - The intent was to use the generate-all views as admin views and this worked for a while but I
   would use db edit tools in future and save on the running server memory. For anything more complex custom
   admin features are required anyways.
 - Does not promote best practise since the controllers are not Service ready and
  I found myself designing the navigation and work flow in a page by page way.

Generate-all is a good way to get started, see simple domain classes saved to a real db and get the basics of gsp+controllers.
Once you know these basics you are going to be much better off writing the front end from scratch using templates for better
re-use and learning jQuery or perhaps ZK or GWT for faster dev prototyping.

As for VCS I'm still using SVN in this project and have always liked it but recommend Git.

Coders inveigle the world from the subatomic level.

On 08/08/11 13:33, Rob Manthey wrote:
Hi again,
Also what's the common recommendation for a best-fit code versioning package for IntelliJ/Grails?  I only know CVS, so its a learning curve with either of the others, and there is no standard CV established here yet.  Preferably it should also be fit for connecting to eclipse and C++/Python/MSDosBasic code, which are used here as well.
Thanks again

On 08/08/2011, at 1:27 PM, RM wrote:


I'm prototyping a web app in Grails, building up the domain model as I go in consultation with the business owner.
What is the best-practice way to write custom gsps and controllers alongside the Grails generate-all output, so that my customisations don't get blown away each time I add to my domain model?  I still want to generate the crud pages in full as I'm going along, at this point at least.
At present I have added two custom gsps and keep injecting some code scraps back into the generated files to connect them, and I've tweaked the entry page. 
Welcome to just point me back to Paul's book or a well-known tut if the answer is already there.

Thanks in advance.


Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Rob Manthey ([address removed]) from Queensland JVM Group.
To learn more about Rob Manthey, visit his/her member profile:
To unsubscribe or to update your mailing list settings, click here:
Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]


People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy