This week I presented on Grails best practices at the Scottsdale Groovy Brigade user group. I’ve had several requests to share the slides, so I’m posting them here for easy access.
For those that didn’t attend, the abstract was as follows:
Grails is an opinionated convention over configuration framework. However, there are still lots of options for how we structure our code. This presentation will be a semi-opinioniated talk about how we can leverage and make further improvements to the existing conventions in order to have better performing and more maintainable applications.
David Kuster is a senior developer and application architect with over 10 years experience. He has worked with Grails for the last 3 years, was previously a GWT bigot, and has made an effort to scale back his technology rants so they are only semi-opinionated.
For anyone coming across these slides who wasn’t at the meetup, let me reiterate a couple things. I stressed the “semi-opinionated” aspect as this is based quite a bit on my own experience as opposed to a one-size-fits-all mentality. I also didn’t have time during a one hour lunch presentation to cover everything listed here – notably plugins/plugin-oriented architectures and database performance – which could be presentations in their own right. (And the database slides don’t even mention eager vs. lazy fetching, the N+1 queries problem, collections potentially loading every instance just to add a new object at the end, etc etc etc.)
Finally, (and this is such an internet cliche, I’m sure) this whole blogging thing obviously hasn’t taken off in my mind like I thought it might. The idea now is to begin the effort again, and these slides will hopefully be a starting point for multiple future topics. One of which – and this isn’t mentioned in the slides but was during the talk – is just how many anti-patterns the default Grails scaffolding introduces to new users and how we might go about fixing that. Unless someone already has and I just don’t know about it?
Regardless, hope you enjoy.