File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Grails Development Process" Watch "Grails Development Process" New topic

Grails Development Process

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

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

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
I agree. Here's the link:
subject: Grails Development Process
It's not a secret anymore!