First off, I have to say that Matt Butcher is an excellent writer. I really like the way he takes a concept, let's you know where he is going, and then follows up with a lucid explanation. He does a great job of explaining his code.
However, on reading the other glowing reviews listed here on Amazon I seriously wonder how many actually tried to work through the example code contained in the book.
Chapter two gives the foundational example of building a module that accesses an RSS feed [...]. The code in the book does not work. So, diligent little beaver that I am, I went to the publisher's web site and checked the errata file. Sure enough, there were corrections to the code. After updating the code, it still didn't work. Finally, I downloaded the code examples from the publisher and found that the working code is *significantly* different than the example in the book! The changes found in the downloaded code not only differ from the book, but also from the corrections in the errata.
So, why do I still give this four stars? Well, it is still a very good book. Matt's skill as a technical writer is noticeably above the majority of technical authors I come across, and you will learn a great deal through reading this book. Just be sure you download the code archive from the publisher, and take the code in the book with a grain of salt until you compare it.
It seems every version of Drupal likes to change the API considerably. Signatures change, and many functions are dropped. Backwards compatibility is really NOT a concern with Drupal. This book covers the current version, 6, of Drupal.
It walks you through all of the code ideas of Drupal module and theme development. And really does a great job of doing this. Even if you are familiar with 5, the book examples are such that you can skim and upgrade your knowledge to 6.x.
One nice addition would have been a bit of reference. Maybe list all of the hook functions. List all of the form component types, with every attribute. I often found myself going online for examples of how to do form components that were not covered by this book.
Last autumn's release of Pro Drupal Development was a significant moment in the history of the popular CMS, providing for the first time a relatively comprehensive guide for those wanting to do more than simply manage and skin a drupal site. A number of books have followed it but few have delved as deeply or been such a definitive guide.
Like most of the more recent books, Learning Drupal 6 Module Development focusses on a quite specific area of drupal development, but its a key one for any serious developer and touches every other area of the system. Experienced PHP developers may find that this book (in conjunction with some time for experimentation) will serve as a solid introduction to how they might build applications on top of drupal.
The book focusses on a single project--a website providing biographies of philosophers--and builds the modules it needs, introducing the various available tools and techniques along the way. Much of the time is devoted to generating custom content types, but there's very solid coverage of the hooks, filters, and actions that let modules really take integrate with the rest of the framework. Theming your output, using AJAX, and working with web services all get some time and illustrate how your app can be part of the wider web and keep up with its prevailing trends. A number of times I found myself reaching for code I'd written over the past few months to make amendments based on examples in the book.
I've been quite critical of books from packt lately and some of my criticisms apply here--he book itself feels flimsy and the print quality is poor--but this is also evidence that if an author and editor put the work in they do occasionally produce quality material despite the publisher. There are a number of asides that clarify language which demonstrate an attention to detail too often missing. It would have been good to see clearer signposts as to which features are new in Drupal 6 and which were available previously, but the online API docs can provide most of that.
When I reviewed Pro Drupal Development I noted some disappointment that the book didn't devote any time to automated testing of drupal code, and that criticism applies here too. Along with staged deployments, automated testing remains one of the least considered aspects of drupal and that's a serious concern for those looking to build robust well-managed applications on top of it. There are a few good articles online about how to test drupal code, but it would be good to see it taken more seriously as a core part of the module development process.
This book is likely to sit alongside Pro Drupal Development on my desk whenever I'm working on a drupal project and is a worthwhile investment for anyone who spends much time building drupal modules. There are clear areas for improved coverage, but it is as comprehensive an account as you'll find of how to build modules that take full advantage of the facilities Drupal provides.
Disclaimer: I was sent a copy of this book for review by the publisher.
I was very excited to receive my copy of "Learning Drupal 6 Module Development" by Matt Butcher. So excited, I asked my wife, "Guess the title of the awesome book I just got?" Her sarcastic reply tells you much about me and the regular lecture she gets, "DRUPAL!?". Ok, so I'm a little beyond this book but the title is so great!
This book aims to provide a sound foundation for programmers new to Drupal on which to build and customize their own features in the form of a module. The ability to add features so simply is the true power of Drupal. Drupal's real goodness isn't truly experienced until you have added 20 contributed modules (over 3500 available today) and several custom modules of your own. It's this ability to extend, transform and over-ride Drupal at your pleasure that Butcher wants to empower you to do. If you are new to Drupal but not to programming I think you will find this book hits it mark. I definitely recommend this book.
The book works you through building an example module like all good technical books should. The example is not trivial and in so Butcher is able to walk you through the major components of building your first module. As I paint this book to be a good reference for those wanting to learn Drupal module development it must be compared to the established king of Drupal references, "Pro Drupal Development" (PDD) by John Vandyk. Although I think that the first book you should buy is PDD, Drupal demands volumes of books to cover the progressing target that is Drupal Knowledge. Butcher's book is slightly more focused than PDD and so is worth the read.
For the past 4 years, I have written Drupal modules daily. I don't recommend this book to an established Drupal developer like myself. Drupal module development has matured a great deal and the standards are high. In order to build the killer module it has to have Content Construction Kit (CCK), Views and Panels integration built in. These three contributed modules are utilized in every project I do lately. All three are being adopted rapidly and migrating to Drupal core. A module that is not CCK, Views and Panels aware is missing it's true potential. I do recognize including these addition were not feasible at the time as these modules had not been ported to Drupal 6 yet and would likely require 3 times the paper to cover. In addition, the newest bar for Drupal module developers to clear is built in automated tests. Without automated tests, you can't expect to build and confirm your modules to be robust enough for the wild wild west that is the Web. It may be fair to say this is too demanding a level to expect of a book of this scope but when I got to the end of "Learning Drupal 6 Module Development" those are the chapters I wanted next. The weak index and lack of an API reference are also disappointing.
Despite the fact that I am a little disappointed in the new knowledge available to someone with my experience, I do recommend this book to someone wanting to start the never ending training of Drupal module development. Butcher does cover the changes in Drupal since version 5 well (menu system is lacking): A revamped theming system, more robust install profile system, actions and sending mail. If you have no experience with PHP development I recommend starting with, "Building powerful and robust web sites with Drupal 6" by David Mercer.
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.
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.