Skip to Main Content

Web Design & Development & other random crap is what I'll be blogging about here...

Pro Drupal Development Second Edition

Review Introduction

The following is a review of Pro Drupal Development (second edition) by John K. VanDyk. I received a free copy from Apress by mail on the 25th of August. I was hoping to get it a few days before the release, but snail mail got it here on the day it was slotted for official release so I felt a little less special although I still ripped into the packaging like an 8 year old at Christmas!

I was a big fan of the original book by John K. VanDyk and Matt Westgate, and that book helped guide me through many of my first Drupal sites. That book was an invaluable resource in turning me to the Drupal revolution, as now all of my personal and corporate sites are based in Drupal.

The first thing I read in Pro Drupal Development (second edition) was the foreword by Dries Buytaert, the Drupal founder and project lead. One funny, but true item that stuck out in the first paragraph was:

 

I don't think I know a single Drupal developer who doesn't own a copy of the first Pro Drupal Development book.

I thought that point went somewhat without saying, and it will very likely hold true that any and every Drupal developer using Drupal 6 should own a copy of this new version as well. Dries goes on to speak about Drupal 6, and changes that rendered the old book obsolete, and endorse how well this new second edition corrects all those issues. You truly can't say much bad about a software book where the creator of the software endorses it, and writes the foreword.

Review of Pro Drupal Development (second edition)

Now let's get to the nutt meat of what really makes this book a must have for any professional Drupal developer. My copy, still fresh with that new book smell, is already littered with post-it tags for easy reference. From the picture at the top of this post, it's hard to really see how many there are, but the image below should show it well (click for full view). Note: The coffee stains are not included in the price of the book. The items in blue are for my own reference and daily usage, and the orange tabs on the side are for mentioning here in this review, and potentially blogging on later.

Chapter 1 - How Drupal Works

This introductory chapter introduces new users to Drupal and its inner workings. It is quite short touching the basics on the Drupal file structure, core framework, hooks, modules, themes and how Drupal handles requests to the system.

This is a great chapter for all new users to Drupal, and individuals or companies considering Drupal for their content management needs. An advanced Drupal ninja will skip this chapter over, but it does provide a great overview of how this software is put together, and how the individual components tie together in this advanced system.

Chapter 2 - Writing a Module

This is one of the chapters that both in this new second edition, and in my copy of the original has tons of dog-eared pages, and fingerprint smudges.

While the Drupal core provides a vast array of built in modules that provide tons of features packed in to the basic version, it is impossible that Drupal, or ANY other content management system could accurately provide all of the features that every site needs.

With that in mind, Drupal was built on a modular framework that allows developers to write custom modules using the very detailed Drupal API. "Core Hacking" as it is sometimes called is a sin among developers. When a developer hacks or modifies a file that is in the core distribution, it makes upgrading both feature release versions and security releases tough at best, because those changes made to the core files have to be merged in so that a developer could maintain the functionality they have hacked in. By using custom modules, they allow the Drupal core to remain untouched, making upgrades a breeze, and allowing your modules consisting of various feature additions or changes untouched, and still working as intended.

This chapter delves into writing a custom module from start to finish, and is a great reference any time you are developing a new module. It touches on things like .info files, how to use the hook system to have your module tie into and manipulate advanced core features.

John walks you through creating a custom module to add annotations to nodes. This module goes all the way into storing data in a custom database table, using features like hook_install and hook_uninstall. This is a great lesson for any new module developer to walk through step by step to get a basic understanding of many of the components involved in a module.

Chapter 3 - Hooks, Actions and Triggers

Chapter 3 moves into further explaining Drupal hooks, and how they affect developers, as well as actions and triggers, which enable modules to perform custom actions when a trigger has been pulled.

This chapter is a great read for adding further functionality and options for custom actions with your own modules and drupal setups.

Chapter 4 - The Menu System

Another great chapter for any Drupal developer, as the Drupal menu system is much more complex than that found with many basic content management systems. The Drupal menu system provides callback mapping for accessing functions in Drupal or your custom modules using the hook_menu Drupal hook. This chapter goes into callback mapping, protecting menu items with access control (permissions), and customizing menu items along with placement of the menu items.

This was a chapter in the original book that I read word for word at least a dozen times while learning, and trying to better my skills with setting up menu items for my modules. I skimmed it this time, but can guarantee that you'll get your money worth out of this chapter alone in this book as it clears up a fairly complex feature of Drupal and how to get it working to your benefit.

Chapter 5 - Working with Databases

This chapter works obviously with databases. Drupal works with multiple database types and the abstraction layer used provides both ease of use on multiple systems as well as security as well.

This chapter is a MUST read if you are using any custom queries in your customizations. It may seem like "Hey, I'm already a MySQL expert, I don't need to read this.", but in truth, it presents the custom way Drupal handles queries, and the syntax of your queries will need to be modified accordingly to work with Drupal.

Chapter 6 - Working with Users

This chapter on working with users is a big chapter for community sites powered by Drupal. By default, the Drupal user profile is quite a bit lacking. There are many ways to overcome this, and make a user profile like you'd see on many major community sites. This section will help you understand the user object, and how to customize it. A great benefit for users working on modules related to the user.

Chapter 7 - Working with Nodes

This chapter discusses nodes and node types and demonstrates creating a custom node type by using hooks to create them automatically when a module is installed, as well as the default admin interface from the backend of Drupal.

Moving on...

I was "planning" on writing a note on each of the chapters, but with the time this has already taken, I think that I'll let you gather your own opinion on the rest of the chapters in this book. The chapters are listed below so that you can at least get an idea of what is inside. They all are very useful, and well put together.

In my experience with this book, and with the first edition, when working on a Drupal site, I may need to review or reference 3 or 4 chapters of this book. On the next project, it might be a different 4 or 5 chapters. Each are very usefull, and to the point with great examples and text that's easy to follow.

  • Chapter 8 - The Theme System
  • Chapter 9 - Working with Blocks
  • Chapter 10 - The Form API
  • Chapter 11 - Manipulating User Input: The Filter System
  • Chapter 12 - Searching and Indexing Content
  • Chapter 13 - Working with Files
  • Chapter 14 - Working with Taxonomy
  • Chapter 15 - Caching
  • Chapter 16 - Sessions
  • Chapter 17 - Using jQuery
  • Chapter 18 - Localization and Translation
  • Chapter 19 - XML-RPC
  • Chapter 20 - Writing Secure Code
  • Chapter 21 - Development Best Practices
  • Chapter 22 - Optimizing Drupal
  • Chapter 23 - Installation Profiles

Review Conclusion

All in all, I love my copy of "Pro Drupal Development (second edition). After owning the first edition as well, I am a big fan, and will continue to use both of these books for the unforeseeable future. I recently took a project that had me referring back to the old first editon, as the site was done in Drupal 5, so it still serves as a useful reference of it's own.

This new edition really cracks into Drupal 6, and adds in lots of content that was missing from the first title.

It is a MUST HAVE for any serious Drupal developer. Perhaps if you even are only a Drupal site owner with one Drupal site, this would be a great reference for further understanding how your site is built, and things that can be accomplished should you choose.

Go out and buy this book immediately. Amazon currently has it for almost 40% off of the cover price!

You should keep going with chapter review!

I think you will see a lot of traffic for a fully fleshed out review of all the chapters. May take several posts but I would drop you on google reader and then chew through each installment of reviews. One of the things that is lacking right now in the Drupal world, is some compare and contrast which this did well. I am sure I will own one this week, but would still come back here for a review!!

I appreciate that!

Thanks for the comment... I had them all lined out, and it was just taking too long to continue the "meat" of the review, so I wanted to wrap it up to publish...

I'll take it under advisement, and will likely finish those other chapters.

Are CCK and Views covered....

I did not see a chapter for CCK and Views... perhaps this is covered within a chapter... And maybe there is more insight for using these modules... Yes?

Thanks...

CCK is (barely) and no to Views

CCK is covered on pages 158 & 159 in the "Working with Nodes" chapter. It's nothing really in depth, but John puts that on the fact that at the time of the writing, CCK was in heavy development, which it sure was, just a rough beta at best.

I don't see anything covering views, even in the index. I'd assume the same reason, since Views 2 for Drupal 6 changed so much over the 1.x versions for 5.x, there wasn't enough reliable data at the time of publishing to put into print...

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><p><div><span>
  • Lines and paragraphs break automatically.

More information about formatting options

My Latest Tweets

  • Please wait while my tweets are loading, or if there's an issue, just go to my twitter page.