Writing the Book on Drupal 7 Module Development

by Larry Garfield

Drupal 7 Module DevelopmentWhen Matt Butcher asked me at DrupalCon Paris about helping out with the Drupal 7 version of his Drupal book, I expected to write a few paragraphs about the database layer. Little did I realize I was signing on for a year-long mega-project.

15 months later, though, Drupal 7 Module Development has finally been published by an all-star team of authors that it's been a pleasure to work with. Of course, that's not really a surprise. I've worked with all of the authors before.

After Paris, Matt decided to bring in several other members of the Palantir team to work on the book. After some discussion we ended up with six co-authors, each writing two chapters:

  • Matt Butcher, developer extraordinaire and a disturbingly well-published author.
  • Greg Dunlap, Deploy master and Services maintainer.
  • Matt Farina, who has managed to touch nearly every subsystem in Drupal in the past year even though his main focus is jQuery.
  • Ken Rickard, one of the few people who comprehends the node access system.
  • John Wilkins, co-maintainer of Zen and a top contributor to Drupal 7.

And last but not least, yours truly. Matt Butcher and Greg Dunlap have since moved on from Palantir but that didn't stop the team from being able to work together to shape the book.

Although we had a previous edition to work from, Drupal 7 is such a radical change from Drupal 6 that it was easier to simply write the book again from scratch. The new book is almost entirely new content covering the latest version of Drupal in tutorial fashion. Each chapter shows how to build a new module, sometimes building on previous chapters, and along the way introduces the reader to most of Drupal's key systems. Although we had originally planned to include some critical contrib modules and APIs we quickly realized that core itself was already too big to cover completely so we had to drop that idea.

Although written to be approachable for someone new to Drupal development, it is our hope that even seasoned developers can find something worthwhile in it. For example, Drupal 7's Javascript system has been heavily overhauled from Drupal 6's. If you're used to doing advanced Javascript and form handling in Drupal 6, Drupal 7's may take you by surprise. That's why chapter 10 covers the new Javascript system in detail. Other systems, such as core Entities and Fields (chapters 6 and 7), are completely new or bear so little resemblance to their predecessors that they might as well be new. Having worked with both Drupal 6's CCK API and Drupal 7's Field API, I can say from experience that the differences are considerable and even experienced developers will be helped by those chapters.

At least they helped me, and I wrote them. It's often said "you do not understand what you cannot teach". Digging through the code for Field API in order to figure out how to explain it is what drove home for me just how that whole system works (and where its warts are). It also drove home another important fact: Drupal 7's API documentation is light-years better than Drupal 6's, or anything in contrib. Hats off to the entire Drupal 7 development team for all of their hard work, both on code and on documentation.

Of course, a year long cycle means we were writing the book throughout the Drupal 7 code freeze, which as anyone close to the project knows was, as usual, rather slushy. With APIs that kept changing (or started working), we had to revisit the text several times to try and "chase HEAD". That's another downside of such a long development cycle. In fact, even though we're in RC state there have been a few (small) changes to Drupal 7's APIs even since the book went to print earlier this month, and there were some late changes that we simply didn't catch. Our publisher insisted on going to print as soon as possible, though, so there are a few bugs in the text when things changed out from under us. Please keep an eye on the Errata for corrections, as there will surely be a few.

Thank you again to my partners in crime writing. If you're looking to kick-start your Drupal 7 development career head on over to Packt's site (hey look, it's Drupal!) and pick up a copy of Drupal 7 Module Development. Save a tree and get the eBook version. Every purchase also helps support the Drupal Association, which in turn supports Drupal. Everybody wins.

See you at DrupalCon Chicago. (We should have copies for sale there, too.)

Comments

Just wanna share that I'm doing a book review of the Drupal 7 Module dev book from Packt.

After scanning and sneaking the contents, I'm getting very excited to give the book a full read!

What a great way to start 2011 (plus with Drupal 7's official release last week).

I'll link back to this post after I complete my review article.