Learning Drupal 6 Module Development: A practical tutorial for creating your first Drupal 6 modules with PHP
Item Description
In Detail
With great power comes... tremendous flexibility. Drupal is an award-winning open-source Content Management System, and the feature-packed sixth release is right around the corner. It's a modular system, with an elegant hook-based architecture, and great code. These are a few of the perks that make Drupal a choice platform for developers who want the power of an established CMS, but the freedom to make it work for them. From social networking to AJAX to e-commerce, the hundreds of existing modules attest to Drupal's flexibility. When you create a new module for Drupal, it fits seamlessly into the look and feel of your overall site. If you can think it in PHP, you can code it as a Drupal module.
Dive into Drupal module development as we create the Philosopher Biographies website, developing new modules and themes to meet practical goals. Create custom content types. Add AJAX functionality with the jQuery library. Use external XML APIs to add content to your site. Email newsletters to site members. Use themes. Empower administrators with extra features. And bundle it all up in a custom installation profile. You won't find a "hello world" here!
If you're eager to start creating modules for Drupal 6, this is your book. Walk through the development of complete Drupal modules with this primer for PHP programmers. Specifically written for Drupal 6, this book will get you coding modules as quickly as possible, and help you add the features that will give your work that professional gloss!
Just getting started with Drupal development? This book will give you a clear, concise and, of course, practical guidance to take you from the basics of creating your first module to developing the skills to make you a Drupal developer to be reckoned with.
Are you a Drupal developer looking to update to version 6? This book covers the new and updated APIs to guide your transition to Drupal 6. The new menu system, the Forms and Schema APIs, and many core revisions are covered in this book.
What you will learn from this book?
- A developer's overview of important Drupal concepts and APIs, like nodes, menus, and forms
- Using Drupal tools for module development
- Creating a new module from scratch
- Harnessing the power of the Drupal hook system
- Using key Drupal functions
- Creating custom content types, from basic to advanced
- Performing database operations
- Writing module installers and uninstallers
- Making Drupal content available to JavaScript with a JSON service
- Interacting with the theme system to build crisp layouts
- Creating richer user interfaces with Drupal's JavaScript libraries
- Working with blocks, nodes, actions, and menus
- Using a web service to retrieve and display XML data
- Creating an administration interface
- Customizing user profiles
- Writing actions and triggering them with events
- Working with the Forms API
- Defining custom hooks and making modules work together
- Exploring the database and schema API
- Creating an installation profile to bundle your modules into a custom Drupal distribution
Who this book is written for?
This book is written for PHP developers who want to add custom features to Drupal. You will need to know the basics of PHP and MySQL programming, but no experience of programming Drupal is required, although you will be expected to be familiar with the basic operation of Drupal.
Product Details
- Author: Matt Butcher
- Publication Date: 2008-05-08
- Publisher: Packt Publishing
- Product Group: Book
- Manufacturer: Packt Publishing
- Binding: Paperback, 328 pages
- Package Dimensions:
- Dimensions: 906L x 748W x 94H
- Weight: 146
- List Price: $39.99
- ISBN: 1847194443
- ASIN: 1847194443
Customer Reviews
Average Amazon User Rating:
Hung up on Chapter 2
2010-07-02
Reviewer: Andrew
I'm not sure if any of the other reviewers actually tried to implement the code in the book. In chapter 2, the Goodreads module does not work and the errata probably won't fix it. The downloadable code works for the most part, but one of the functions (the _goodreads_block_content function on p46) is completely different than what is described in the book.
Still, there's lots of good learning material, but don't count on the code in the book to actually work. Use the downloadable code instead.
Indepth, Concise Introduction to Programming D6 Mods
2010-05-17
Reviewer: Dan Spurgin
As my title says, this is a "Indepth, Concise Introduction to Programming D6 Mods". Matt fully covers the breadth of the drupal system, but equally important he masters the art of brevity.
He winnows out all the advanced minutia, and delivers the crux of what you most need to know without being too remedial.
This is the book programmers want to read before they dive into an all inclusive reference type book (i.e. "Pro Drupal Development" --> great book but 650 of minutia means you have to spend lots of energy figuring out what matters most)
Good book but glaring ommission with core code example
2009-02-16
Reviewer: Kevin Roberts
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.
A good place to start!
2009-01-16
Reviewer: Michael Hofmockel
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.
Excellent Hands-On Way to Learn
2008-11-29
Reviewer: E. Peck
Working through this book is like having a Drupal expert sit down and walk you through everything you need to know to jump into Drupal module development. It's a pleasant read with a really nice balance between information and practical application.
I was surprised at how quickly I was creating my first module. There is some excellent information on how the core modules of Drupal work as well, so there is a lot here even if someone doesn't want to create their own module, but just wants to know Drupal better. Also a must have for anyone who might want to work on an existing module.
This is a really great book and it doesn't hurt that buying it means that part of the money Packt makes on the book goes to Drupal. Readers will be equipped to better contribute to the community and funding it financially while helping themselves out at the same time. Pretty nice.

