Book Review: Learning Drupal 6 Module Development (published by Packt Publishing)

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Chris Charlton's picture

Only local images are allowed.

My book review pasted from Amazon.com. I reviewed the book for the publisher but that never guarantees a good review, so read on.

I must say I was asked to review this book, and I was very excited to do so. I thought it'd be good to comment on areas for people who aren't familiar with Drupal on a daily basis yet, and to give you some background, I was very excited to read this book. I needed a book that had the words "Drupal 6" and "module development" in it and luckily this book was titled exactly that and delivered. So, to newbies and non-newbies I offer the following review.

If you're impatient and don't want to read this review all the way, then just know this book must be read by each programmer who will be tinkering with Drupal, so yes, I recommend it. This book is not for people learning how to use modules, this is for people who plan to code and build their own modules. This book is not large, has great learning material, and brings tons of info down from Drupal's web site documentation into stress-free chapters. One entire chapter (Ch. 2) covers how to do an entire module from scratch and following chapters show how expand that module and build, and build, and really get to know important APIs that come with Drupal core.

In all honestly, I'm jealous that most new users get to read something as collected as this to learn from. If you read this book you'll basically catch up with content I took months, if not over a year to explore and read online. I had also held off heavy Drupal 6 development for myself until a book like this came out, so we're in the same boat.

Right of the bat, if you run more than one site with Drupal then most of the first chapter, as expected, are basics and overviews of Drupal concepts. Those new to Drupal are lucky to have everything summarized nicely in a single chapter. I think the points for people to get familiar with here are Hooks, Forms, Schema API, and the developer tools mentioned in the first chapter. As a frequent Drupal user, I get impatient reading this stuff since I was more eager to learn about module development, and then it happened.

The second chapter was so entertaining and rocks because it doesn't let you go until you do a whole new Drupal 6 module from scratch - proper install code, un-install code, render a custom block, administration configurations for that custom block, and it even makes sure you don't forget the proper help text that should be included with all modules. Good stuff and I felt accomplished. Chapter two is worth almost the price of the book if you don't want to fiddle with online docs, it's one of the beefy chapters since it covers the whole process of completing a tangible, useful module. I started to think that if the second chapter had all this useful content then the rest of the book may be sprinkled with gold, and it mostly is. The book constantly builds on its chapters but never in a "to be continued" fashion; each chapter stands on its own very well.

Chapters three and four cover the theme layers of Drupal. Chapter three is the technical introduction chapter and covers all important faces of theming Drupal, but not your custom module. Chapter four steps in and completes the circle of module design by showing how to code module theme hooks, allowing anyone to code theme overrides for the output your module renders. Very cool and a must-know for Drupal module developers.

Chapter five starts getting into pizazz with some Javascript & Ajax. They touch on jQuery for a second, but I felt they cheated on the jQuery and could have shown some simple form trick at least. The chapter jumps more into Ajax stuff, which threw me off a little since I was still expecting more jQuery bits, but again, this book has a lot and each chapter definitely stands on their own. I went back to this chapter again some time later. I know I will still come back to this chapter since it makes sense that some of my module ideas use Ajax for their loading of content dynamically.

Going back to PHP code, chapter six compliments earlier chapters by diving into custom administration screens and more behind-the-scenes module code. I love this stuff. Key info here for developers trying to tie Drupal with external services. This chapter only scratches the surface of what's possible in creation of admin features and screens, but when you think about adding some Flex or Ajax you're sure to give birth to a sexy Drupal module.

Chapter seven, much like chapter two, is a workhorse chapter and shows how to produce custom content types with pure PHP. If you know of the CCK (Content Construction Kit) module, which helps build custom content types within Drupal, one must know that you can run both coded content types and CCK types on a site but one must weight their options of which way to go in terms of integration with other modules. This chapter helped me refine my content types building process and I was really glad to read a whole chapter dedicated to just programming CCTs (custom content types) in Drupal 6. This chapter also covers custom module permissions, forms, the Schema API (new for Drupal 6), and of course the Node API which is at the heart of Drupal.

If all that isn't getting you excited, chapter eight raises the bar even higher covering Filters, Actions, and Hooks. I swear, that was a chapter that assured me why I adopted Drupal. Not too much code is created here, but that's half the beauty of Drupal hooks and modules! I would suggest, just like the theme hooks, that module developers really look at Actions to see if they can ship some with their modules.

The final chapter, nine, covers coding Installation Profiles, which is a wonderful concept in theory and I actually like install profiles, but I don't like to hand code them. I personally rather use profile generators, which works in Drupal 5, and I'd rather wait for that module to create install profiles in Drupal 6, but this chapter was very informative and even helped me think out pros and cons of my desired module settings, but still, I did not see this chapter entirely necessary for module developers. It's a lot of code, so some of you may be all over this stuff, but not me, not today. No biggie since its another chapter full of good info, and that's value. In fact, that seemed to be the recurring theme of key chapters in this book - loads of valuable info in each chapter.

You should have gathered by now that I liked this book and you should just get it already. Get this book and covet it all through the start of your next Drupal development project.

To purchase or read more about the book visit http://www.packtpub.com/drupal-6-module-development/book and tell them LA Drupal sent ya!

Comments

Thanks

giorgio79's picture

Thanks, I just installed Drupal 6 and it is time for me to start diving into module development, will be checking out this book. :)

Review Critical
ClipGlobe - World Travel

****Me and Drupal :)****
Clickbank IPN - Sell online or create a membership site with the largest affiliate network!
Review Critical - One of my sites