One of the biggest challenges in developing web applications is the ability to alter the behaviour of your program once the application has been deployed.

If you are building a highly extensible application like a content management system or an e-commerce engine, you don’t necessarily want to restart or redeploy every time a change has been made. You also want the ability to define business rules, add custom scripts, and turn functionality on and off.

In this post, I will show you how to externalize application functionality using closures, the Groovy configSlurper and the pluggable behaviour pattern.

As some of you might now, I started a new job with DMC Digital / Dealchecker. One of my first tasks was to migrate a pretty large Spring application ( ~650 beans, 120 domain objects ) into Grails. In the next posts, I will outline some of the lessons learned and share tips and ideas about enabling the Grails stack within large Spring Applications.

One of the more daunting tasks is figuring out where to put all the Spring-related stuff into the Grails application structure. Here is a picture I made to help myself remember where all the bits and pieces fit. ( Think of it as chapter 1 of my upcoming and completely fictitious Head First Spring – Grails Migration book ).