Book Review: Drush for Developers (Second Edition)

Published March 24, 2015

Drush for Developers (Second Edition) book cover Calling this book a "second edition" is more than a little bit curious, since there is no Drush for Developers (First Edition). I can only assume that the publisher considers Juampy's excellent Drush User's Guide (reviewed here) as the "first edition" of Drush for Developers (Second Edition), but that really minimzes ths book, as it is so much more than an updated version of Drush User's Guide. It would be like saying The Godfather, Part 2 is an updated version of The Godfather - which is just crazy talk. Drush Developer's Guide is more of a sequel - and (like The Godfather, Part 2) a darn good one at that.

This is not a book about learning all the various super-cool Drush commands available and how awesome Drush is and how it can save you all sorts of time (see Drush User's Guide). This book is for people who already know what Drush does, already have it installed, and probably already use it every day. It doesn't lay the groundwork like a guide for newbies, it takes your average Drush user and "levels them up."

Granted, the first chapter has some necessary introductory material: what is Drush, how do you install it, how can you use it to save the world. Been there, done that. But, it is in the first few pages of the second chapter that Juampy tips his hand - this is really going to be a book about using Drush to create an efficient local-dev-stage-production workflow.

He introduces the topic of the "update path"; a sequence of drush commands that can be used when pushing code (with features) between environments to ensure that the "destination" environment is properly updated to take advantage of the updated code. Turns out this book is actually about creating an efficient workflow - it just happens that Drush is an excellent tool to accomplish the task. For the most part, he starts with a very basic "update path" and then spends the rest of the book iterating on it and improving it in virtually every section.

Along the way, Juampy does a great job of introducing us to a number of intermediate-to-advanced topics. He covers Drupal's registry for module and theme paths, the Features module, cron, Jenkins, Drush and Drupal bootstrapping, and Drupal's Batch API - to name a few. Each of these new topics never seem to be forced - there is always a compelling reason to spend a few pages with each one in order to improve the "update path".

Juampy also does a nice job of covering the basics of creating a custom Drush command, including an entire chapter devoted to error handling and debugging. I especially appreciated his examples of how to create a custom Drush command that calls a number of other Drush commands. This makes it possible to design a custom workflow that can be executed with a minimum of commands.

The book reaches its crescendo in the second-to-last chapter, "Managing Local and Remote Environments". Juampy deftly covers site aliases then quickly integrates them with the "update path" he started in chapter 2, to end up with a super-solid workflow that anyone can adapt for their own purposes.

He wraps things up with a chapter on setting up a development workflow, but by the time I got to this chapter, my mind was already racing with how I could improve my current workflow with the ideas already presented. The information in the last chapter seems incremental in comparison to the rest of the book, but there are great ideas nonetheless. Having a site's docroot at the second level in the Git repo and fine tuning database dumps from production was the icing on the cake.

Personally, I can't wait until I finish writing this review (I'm almost there!) so that I can implement some of Juampy's ideas in some of my client projects. If you feel like you're only using 10% of Drush and want to take it to the next level, buy this book.

I did exchange a few emails with Juampy while I was writing this review. (He did confirm that there is no "Drush for Developers (First Edition.)" I can only hope that the "Second Edition" in the title doesn't dissuade anyone from picking up this book - it is a worthy addition to any Drupal professional's library.

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

Name
CAPTCHA