Monday, December 1, 2008

Grails

Been playing with Grails (http://grails.org/).

Positive first impressions: Conceptually, what is not to like about the possibility of defining your domain model and having a functioning GUI up in a few clicks? The Grails generated web-app code and structure appears much neater then, for example, what JBoss SEAM produced. I am also, for the moment, loving writing web-app controllers in Groovy. It feels so much more natural, for that purpose, then Java.

On the negative side: Conceptually, I don't see any non-trivial benefit to defining domain classes in Groovy instead of Java. On the contrary, it seems to me, that in any real enterprise context, you are going to want to define your domain (and perhaps a service layer) in Java. Additionally, if you use Java domain objects, you can reverse engineer them from the database using a tool like hbm2ddl. The development focus on POGOs makes me a little nervous that maybe the Grails development team is more focused on replicating Rails then really thinking about how Grails can most naturally fit into an Enterprise Java environment. The purchase by SpringSource does offset this fear.


Finally, grails seems to enjoy failing without useful error messages. For example: I ran into http://jira.codehaus.org/browse/GRAILS-2096 and http://jira.codehaus.org/browse/GRAILS-3658

No comments:

Post a Comment