1. Read the Groovy books
Groovy is the heart of Grails, but it is surprising how easy it is to get by writing code the Java way.
I think it was four months after I started writing code in Grails that I started looking at the Groovy books, and they definitively helped me improve the code I was writing tremendously.
- Venkat Subramaniam’s Programming Groovy – Good chapters on metaprogramming.
- Dierk Koenig’s Groovy In Action, 2nd Edition, MEAP – Excellent for understanding newer concepts like AST transformations.
2. Consume videos, podcasts and blogs
There is no lack of new content being published on the web about Grails and Groovy. The following are my favorite resources:
- Burt Beckwith publishes a weekly summary of the things going on in the Grails ecosystem in This Week In Grails.
- The Grails Podcast, GoovyMag and Groovy Tweets are really good ways to keep track of new ideas in the Grails ecosystem.
- Messages from Mr. Haki and Peter Ledbrook’s posts on the SpringSource blog are vital references for the Grails developer.
- SkillsMatter publishes all the videos for the Grails Exchange in London for free every year. The collection of presentations is pretty impressive. (2010 | 2009 )
3. Answer one question on the grails-user mailing list every week.
One of the things I like to do is to challenge myself to answer one question in the grails-user mailing list every week. Answering just one question forces me to sift through all the new questions coming through and seeing if I can find a quick and easy solution to a real world question.
Instead of answering something I already know, I try to pick a question that might take 5-10 minutes to answer. More often than not, the questions will force me dig into the code of a plugin or try to do something different within the grails console.
For me, this is the easiest way to come up with a guided exploration of ideas and concepts within Grails. I highly recommend it.
4. Read plugin source code and samples.
Something I found myself doing a lot is digging into the source of plugins like Geb or App-info and seeing how everything connects together. Other times, I find myself digging into smaller plugins like Taggable to understand how other people implement certain things.
I found exploring other people’s code allows me to add to my groovy manna that I can then use when writing my own code and plugins.
Another useful exploration is to expand the source code of the tag libraries within the Grails documentation by clicking Show Source. One of the better surprises for me recently is seeing how elegant the scopes within the g:set tag were implemented.
A final useful tool is to see and read the code that other people have written for the groovy web console.
5. Talk at / attend a conference or user group meeting.
One of the more interesting experiences of my programmer life has come from talking at Grails conferences and user groups. There is just something about condensing the stuff you have learned and talking about it for an hour in a way that doesn’t put your audience to sleep. It forces you to spread out your thoughts and carefully examine the work you do. I highly recommend it.
If you rather just listen, there are a bunch of User Group Meetings.
6. Work on a real project.
Of course, there is no better way to learn Grails than to interact with a real team of developers and work on a real project from start to finish. I’ve often found that the work we do day-to-day helps guide a lot of the blog posts and plugins I end up writing.
Many of my recent plugins like CDN-resources, Website Optimizer and Inviter have come from requirements in our projects. I find that by pairing and working with other people, the way in which I write code just gets better by leaps and bounds.
There seems to be a lot of opportunities popping up, you can always check Grails Jobs for the latest listings.
Finally, if you’re in London and would like to learn more about Grails, why not consider working with Secret Escapes. We are looking for talented Grails developers, so get in touch.