Sunday, September 25, 2011

Whats to Like About Grails? mucho!

Plugin architecture
We have a couple core plugin projects we use as inline projects.  One provides core web standards, layouts, security setup.  Set it and forget it.  When I want to create a new app thats all taken care of - and no I am not copying the code.  I am reusing all web code, resources in an architected way.  Images, CSS, layouts, javscript, domain classes, controllers, everything!  One line in my config file adding the plugin project as one of the plugins for my project and I have it all.

GORM
DSLs are where its at.  At first I have to say I thought the idea of learning mini languages all over the place seemed ridiculous. But if you stop and think about it every problem domain brings some learning curve.  You might know Java and annotations but that doesn't make you a hibernate expert.  DSLs when done right bring the learning curve down.  They provide the proper abstractions and expressiveness for the problem domain.  So DSLs like GORM constraints or mappings, once you've worked with them a little, become surprisingly simple.

Plugin central!! It is amazing what is out there for Grails plugins. If all the plugin did was resolve the dependencies for adding APIs they would be good to have - but they do way more.  They bridge/adapt that technology to GRAILS -augmenting! the framework.  The plugin architecture opens up Grails to doing just that.  A good example is the render plugin.  Need to output PDF?  Install the render plugin and you get a renderPDF dynamic method added to your controllers which works much like the render method you are already familiar with.  Contrast that to adding flying saucer to your java project!

Groovy
Closures and much more. Having a dynamic modern language enables so much - i.e. GORM recently added named queries to domain classes.  Check it out if you are using grails - great stuff!

No comments:

Post a Comment