Lumenovis

Technology Consulting and Software Development

Lumenovis header image 3

Grails ROCKS!

March 24th, 2010 · No Comments

So I’ve been pretty heads down for the last year cranking out a number of enterprise Java, service provider, and iPhone projects.  It’s been a hugely productive period and I’ve both taught and learned a great deal.  One of the highlights, though, has to be diving into the Grails web application development framework.  If you’re not familiar with Grails, it’s a “convention over configuration” framework (much like Ruby on Rails) that sits on top of Spring and Hibernate and leverages Groovy to make development faster and easier.  It was a bit of a steep learning curve (probably because I refused to read any of the great books out there (e.g. Grails in Action) and instead tried to learn on the go), but now that I’m up to speed I have to say that it’s made web development fun again.  Gone are the hours and hours futzing with build configurations and XML files.  Gone are the days of writing boilerplate code to transfer data from the brower to the database and back.  With Grails, most of the tedious stuff is done “automagically” and you can focus on cranking out your app.  My unscientific estimate is that I’m producing features 3-5x faster with Grails than I can with Struts 2 or Spring MVC.  Seriously- it’s that good.

Here’s an example.  I’m finishing on an app for a nationwide company that decided a couple of weeks before the portal was to go live that it needed to support co-branding for all of their clients- basically, display a custom logo depending on who was logged in.  The right answer should have been “No!” since we were short on time and had limited resources available, but I had a hunch that Grails would make it easy enough to take on despite the risk.  So I branched the code (just in case), started a timer (literally) and dove into it.  I developed a “Brand” table that would store name, styles, and logos.  I developed full featured CRUD pages for admins to add, change, and delete brands.  I added the Brand section to the Admin section of the portal.  I modified the portal pages to show the brand logos when available.  And I developed a servlet (“controller” in Grails) to serve up images out of the database.  Grand total:  35 minutes and maybe 50 lines of handwritten code.  (To be fair, I should also add another 30-60 minutes for automated test development and testing.)  My guess is that this would have been a couple of days in any other framework.

If you’re a Java web developer do yourself a favor and have a look.  I think you won’t be disappointed.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • PDF
  • Reddit
  • RSS
  • Tumblr
  • Twitter

Category: Software Development | Tags: · , ,

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment