File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Grails Development Process Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Grails Development Process" Watch "Grails Development Process" New topic
Author

Grails Development Process

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I asked this on the Grails mailing list but I really would also like the feedback from ranchers that are using Grails as well. I'll update this thread with valid responses from the mailing list, if any.

I have a small application that needed some features added and I never was real happy with the entire implementation to begin with so I decided to rewrite it and give Grails an honest to goodness run. The last time I was playing around with Grails I skipped the scaffolding stuff and just generated everything. This proved painful as my domain model changed. Every time I needed to add a property or change a relationship for a domain class I ended up having to rebuild views and sometimes controllers. In doing so any customizations I made to these files were wiped out.

I had asked about this on the mailing list before and I was validated in that this is not a great thing but its really unavoidable. That said, I changed my process for this project so that I am using scaffolding as much as possible while fine tuning the domain model. So before I generate any true view and controller code my domain model should be as close to complete as possible. I realize that it will change but hopefully minimally so manually adding the additional code in the views and controllers is simple enough.

Is this a valid approach? Does anyone recommend a different approach? Also are there any new features that I might just be missing that help minimize the impact model changes have on the views? Any type of merging that can happen or migration path?


GenRocket - Experts at Building Test Data
Matthew Taylor
Rancher

Joined: Jun 13, 2004
Posts: 110
I think your process is rather typical for a Grails project.

Because Grails development is domain-centered, the scaffolding is really there so you can do as much domain modeling as possible up front.

There is a point that you will have to abandon the scaffolding generation, of course, and this can be different point for each domain class. Once you have all your domain modeled, relationships created, and data bootstrapped, there is probably no need to generate views anymore.


Grails Consultant
http://dangertree.net
 
 
subject: Grails Development Process
 
Similar Threads
how to design a Web App in Spring: why not web-page driven design?
Grails 1.1 Web Application Development
Grails: Beyond Scaffolding
acegi security plugin, Person and one of my domain objects
Is my MVC design under RMI reasonable?