Posted by Sep 16, 2008
in Grails, Groovy, Java
| 5 comments
Peter and I have been working hard on Grails in Action, and we’re tracking pretty well. We’re nearly 200 pages in, and for a couple of amateur authors (and in my case, amateur Grails developer!), we’re doing ok!
But I think you’re probably more interested in what’s out there so far. Here’s the short summary:
- Chapter 1. Grails Quickstart. In our intro chapter, you get a very fast-paced intro into all of the core parts of Grails. You build an Ajax-powered QOTD application and along the way learn develop a model, view, controller, layout, taglib, service & testcase. It’s fast and furious, but experienced developers will appreciate the pace.
- Chapter 2. Groovy Quickstart. Everything a Java developer needs to know to transition to Groovy/Grails. Peter wrote this and I learnt a ton of things along the way. We originally debated about moving this to an appendix, but I’m so glad it made it to the book proper. Even if you’ve already developed a bunch of Grails apps, there stuff to learn here.
- Chapter 3. Life after SQL. A Domain-centric deep dive into Grails “core stuff”. We introduce the sample application (hubbub, a twitter clone), and we set to work developing a signup feature for it. I didn’t want this to just be a “domain models” chapter, because you should learn Grails naturally – with model, views and controllers interacting – so we make quite a few detours along the way into related areas. You’ll learn all the common relationship types, play with custom validators, dynamic finders and QBE.
- Chapter 7. Extending Grails with Plugins. Peter knows more about plugin development internals than just about anyone, and this chapter shines with that. Lots of good info around interacting with Spring, and tons of stuff that you just won’t find anywhere else.
- Chapter 8. Advanced GORM Kungfu. This is the “less common” GORM features that I didn’t want to clutter chapter 3 with, but did want to spend time explaining. You’ll be playing with domain class inheritance and polymorphic queries. There’s also quite a bit of discussion around performance profiling (p6spy & Hibernate JMX stats) and then how to improve it via custom cache configuration (uses ehcache as the basis since it’s what I know). We then explore Criteria Queries (including hibernate projections and query caching) and HQL. Finally we tackle some legacy issues (Multiple data sources, Hibernate mappings and GORM DSL). There will eventually be stuff on transactions, locking and data migration in this chapter, but that can wait till the 2/3 review.
It’s going out for review today, so I look forward to ego-destroying feedback (my discouragement threshold is insanely high, so feel free to be candid. Some of the original proposal reviewers told me “there’s no way Glen will pull this off”. I think I’ll send them a free copy at the end
How has the writing process been so far? Harder than I thought. The most difficult part has been thinking like a new reader. I started writing in the same style as my blog, but that doesn’t work for a book. After the early reviews I realised that each chapter was full of “separate” blogs rather than flowing as one cohesive whole. I’m still working that through (and the reviewers will probably find that frustrating, but it’s a journey for us wanna-be authors too!)
There’s still a lot of work to do turing our first chapters, but both Peter and I are so happy to have something out in the wild! Next up are the controllers and advance view technique chapters. I’m already having fun working on some funky image resizing/caching for hubbub:
Those on the MEAP programme should get early access by the end of the week. If you subscribe, make sure you leave candid feedback on the author forum since we really want to improve the final book for you guys.
Anyway, time to take a few days off to decompress and play with Griffon