Book Review: Programmer's Guide to Drupal

Published March 19, 2015

Programming Guide to Drupal book cover image O'Reilly's Programmer's Guide to Drupal, written by Jennifer Hodgdon is a solid book for Drupal developers of all skill levels. I'd argue that it is one of the better books for PHP developers wanting to learn more about Drupal. It provides a wealth of solid information on a nice array of topics that professional Drupal developers should know. It's not a long read (less than 100 pages of actual content), but the structure and variety of topics covered makes it a great reference for best practices and intermediate to advanced "what's the best way to do this?" topics in Drupal development.

First I need to confess, this isn't a new book. It was published in late 2012. So why am I reviewing a book that was published over 2 years ago? Well, I don't really have a good excuse. I started reading it right around the time is was released, but it somehow got burried in my reading pile - which I managed to reach the bottom of just a few weeks ago. When I picked it back up again, I realized that I had found a bit of buried treasure.

Jennifer has been a long-time contributor to the Drupal community, specifically in the area of community documentation. She is a past member of the community's Documentation Working Group and is a core committer for documentation and coding standard patches. This background gives her more than enough street-cred to author a book that preaches best practices, common mistakes, and advanced coding examples.

For experienced Drupal developers, the first three chapters are an invaluable resource of best practices:

  • A not-too-deep overview of the lifecycle of a page request from a technical standpoint.
  • A high-level overview of Drupal's caching system.
  • A discussion of six Drupal programming "principles". Within each principle is a technical discussion of topics related to the principle. For example, the first principle is "Drupal is Alterable"; within this section Jennifer discusses hooks, render arrays, and template files. The other five principles read like a manifesto of the things that makes Drupal great (internationalization, accessibility, database independent, security, and testing/documentation). In my opinion, this section alone is worth the price of the book.
  • A discussion of four common Drupal programming mistakes - the first of these is a favorite teaching and consulting topic of mine: programming too much. Jennifer discusses some of the amazing Drupal contrib modules that often alleviate the need to write custom code, and the advantages of having as little custom code in a project as possible.

The fourth chapter is a really nice, concise resource for Drupal developers for some intermediate and advanced Drupal development topics. I found the "Programming with Entities and Fields" section especially valuable. Anyone who finds Drupal's Entity system a bit of a mystery will find a wealth of information about what is included in Drupal core as well as what the contrib Entity API module provides. It provides code examples for creating new fields, widgets, and formatters.

For Drupal developers looking to write their first custom field formatter, Jennifer provides the perfect amount of introductory information and code samples without getting too far in the weeds. Other topics covered in this section includes Drupal paths and well as Views and Rules module add-ons.

The final (short) chapter covers Drupal development tools and resources. It's a nice overview, and a great way to wrap things up.

The Programmer’s Guide to Drupal is a solid addition to anyone's Drupal library. It is one of the few Drupal books that has earned a permanent spot on my within-reach-of-my-desk bookshelf, (no more bottom of the stack for this one) and I have no doubt that Drupal developers of all skill and experience levels will learn something from within its pages.

The second edition of this book - for Drupal 8 - is now available as a early release.

Sign up to receive email notifications of whenever we publish a new blog post or quicktip!