Tuesday, February 27, 2007

The Race Continues

So this is day 2 (I think) of my Grails journey and so far I'm really impressed. Everything has gone as advertised and the angels are going to sing any day now.

Yesterday I started on Jason Rudolph's very excellent free eBook called "Getting Started With Grails", which basically gives a primer on Grails using a Running Club registration application as the basis. His coverage is very well done, and explains each concept (so far) in just enough detail to keep the pace interesting. I'm on page 44 of 133 already and believe it or not, when I started, I can honestly say I had a simple Race Registration web application up and running within 2 minutes. Hard to believe. And Grails is extremely similar to Rails, which I'm thrilled about, since I do think Rails is onto something with their development approach. As with Rails, so much adheres to convention over configuration.

One thing I haven't found yet with Grails is whether it has any schema migration support as per Rails. Since I haven't seen any such headings I'm guessing the answer is 'no'. I'll have to find out from the Grails evangelists what their response to that is. I found that the Rails migration support was very useful, and followed my strategy in C# and Java applications I'd written that had a 'moving target' schema. I had a SchemaMigrater utility that would apply the latest SQL scripts depending on version numbers in the code. It works really well. Anyway, I've made a mental note of that and will follow up later.

The step I'm at currently is to replace all implicit scaffolding with the explicitly generated scaffolding, which is something you can do with Rails. Jason has basically led me through the basic setup, relationship definitions and domain validation steps. Currently I have a default CRUD application that links Races to Registrations, and it does basic validation on the Race and Registration inputs. Next, apparently, we're going to tweak the default layouts etc.

Oh one other note. Grails uses Hibernate, Spring and Sitemesh under the covers. What's impressive is that so far I've not touched a single Hibernate, Spring or Sitemesh configuration file. Everything thus far has been convention over configuration. Impressive. I'm kinda excited to click the 'Next Page' button in Acrobat. Tweakage, here we come.

No comments: