Drupal 7 Module Development and over one million other books are available for Amazon Kindle. Learn more



or
Sign in to turn on 1-Click ordering
Sell Us Your Item
For a $13.75 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Start reading Drupal 7 Module Development on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

Drupal 7 Module Development [Paperback]

Matt Butcher , Larry Garfield , John Albin Wilkins , Matt Farina , Ken Rickard , Greg Dunlap
4.2 out of 5 stars  See all reviews (16 customer reviews)

List Price: $44.99
Price: $40.49 & FREE Shipping. Details
You Save: $4.50 (10%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it Tuesday, May 28? Choose One-Day Shipping at checkout. Details

Formats

Amazon Price New from Used from
Kindle Edition $14.57  
Paperback $40.49  
Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Book Description

December 3, 2010
This book takes a hands-on, practical approach to software development. The authors, all professional Drupal developers and contributors to the Drupal project, provide accessible coding samples designed to exhibit not only the technical merits and abilities of Drupal, but also proper architectural and stylistic approaches to coding on one of the world's most popular content management systems. Every chapter provides fully functional code samples illustrating the APIs and strategies discussed in the chapter. With this foundation, developers can quickly build sophisticated tools on their own by making use of the strategies and techniques exemplified in this book. If you are a PHP developer or a Drupal user looking to dive into Drupal development then you will find this book an excellent introduction to coding within Drupal. Those with some Drupal experience will also find this an invaluable tool for updating their knowledge about the powerful new features of Drupal 7. Theme developers looking to extend their abilities will find this an accessible introduction to PHP coding within the Drupal environment. This book assumes that you are familiar with basic PHP programming, along with HTML and CSS. No experience with programming Drupal is required, although it is also a handy way for experienced Drupal developers to get up to speed with Drupal 7.

Frequently Bought Together

Drupal 7 Module Development + The Definitive Guide to Drupal 7 + Using Drupal
Price for all three: $104.67

Buy the selected items together


Editorial Reviews

From the Author

From John Albin Wilkins, author of Chapters 3 & 4: Only a handful of people claim to understand the entire Drupal theming system, so I was very happy to share my experience with theming strategies and my knowledge of the theme system internals. These chapters represent the first thorough explanation of Drupal 7's theme system, a critical system all module developers will need to interact with.

From the Back Cover

Drupal is an award-winning open-source Content Management System. It's a modular system, with an elegant hook-based architecture, and great code. Modules are plugins for Drupal that extend, build, or enhance Drupal core functionality.

In Drupal 7 Module Development, six professional Drupal developers use a practical, example-based approach to introduce PHP developers to the powerful new Drupal 7 tools, APIs, and strategies for writing custom Drupal code. This book will walk you through the development of complete Drupal modules and show you how to add various features to meet your requirements.

Who this book is written for

If you are a PHP developer or a Drupal user looking to dive into Drupal development then you will find this book an excellent introduction to coding with Drupal. Those with some Drupal experience will also find this an invaluable tool for updating their knowledge about the powerful new features of Drupal 7. This book assumes that you are familiar with basic PHP programming, along with HTML and CSS.

No experience with programming Drupal is required, although it is also a handy way for experienced Drupal developers to get up to speed with Drupal 7.

What you will learn from this book
  • Learn how to work with Drupal's hook system
  • Explore the major APIs introduced in Drupal 7 that the pros use to build successful Drupal websites
  • Build and extend themes and modules to make Drupal 7 shine
  • Apply the principles of Test Drive Development (TDD) and test your code programmatically using Drupal's new built-in Simple Test framework
  • Leverage the book's working module examples as a starting point for your own code
  • Discover the secrets of Drupal professionals as they explain the practical aspects of good Drupal development

Product Details

  • Paperback: 420 pages
  • Publisher: Packt Publishing (December 3, 2010)
  • Language: English
  • ISBN-10: 1849511160
  • ISBN-13: 978-1849511162
  • Product Dimensions: 7.5 x 0.8 x 9.2 inches
  • Shipping Weight: 1.9 pounds (View shipping rates and policies)
  • Average Customer Review: 4.2 out of 5 stars  See all reviews (16 customer reviews)
  • Amazon Best Sellers Rank: #176,922 in Books (See Top 100 in Books)

More About the Authors

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Chapters 8 and 9 cover permissions and security, as well as node access. Nathan Smith  |  2 reviewers made a similar statement
And I've read pretty much every Drupal book that came out 2007-2009. Jennifer L Simmons  |  2 reviewers made a similar statement
Most Helpful Customer Reviews
14 of 14 people found the following review helpful
5.0 out of 5 stars Well done by competent authors January 20, 2011
Format:Paperback
(Full disclosure: The publisher of this book sent me a review copy)

This book will serve as a tremendously helpful introduction to Drupal programming for programmers. It does assume you know PHP, and warns you (or comforts you, depending) early on that there won't be much OOP here and there will be a lot of structured arrays. The chapters don't necessarily follow in order one to the next, and aren't explicitly linked one with another.

For programmers new to Drupal chapter one should be required reading. And while occasionally the book slips into "what's new" mode, for the most part the reader is considered a competent PHP coder but not necessarily someone fluent in Drupal programming.

The examples given throughout are mostly useful. One thing I hate about programming texts is when they show what the language/system can do with ridiculous examples. With the glaring exception of the Javascript chapter, this book does not stoop to such levels, instead giving real-world problems solved through the Drupal API.

The style of the book is nicely conversational. The overt humor is sparse, but at the same time you don't ever feel that you're sitting in a lecture hall. The authors seem quite well-versed in the material and aren't subjecting you to death-by-powerpoint-by-screenshot. They don't talk down to you, ever, guiding the reader through the API as a comrade. Even in the areas of security and best practice, when it would be easy to slip into browbeat mode, they resist, presenting facts instead of opinion and advice rather than orders.

The main problem I had with this book is that I feel there are parts missing. The book begins talking about how we'll use modern techniques, and mentions Drush, the Drupal shell, one of my favorite tools. And that's the last we'll here of it. Seriously. Even when the installation profile chapter says we can use profiles at the command line, we end up writing a command line PHP script instead of leveraging Drush. An oversight in the editing, perhaps, to mention it at all?

Also absent any real treatment is *contributing* rather than simply *developing*. A "10 minute git tutorial" appendix wouldn't have been out of line. There's no mention of how to be a good module maintainer, dealing with releases, submitting your module to drupal.org, or any such thing. While that's not necessarily within scope, such a discussion is noticeable in its absence, particularly when the community is perhaps the strongest thing about Drupal. Given the status of the authors as top-tier contributors, it's a curious omission.

There are some nitpicks, some spelling errors, wrong screenshots, and discussions of things (ie., drush) that just aren't there. No more, perhaps, than any other book of its size, and nothing that was too glaring or anything that would stop one in their tracks. We do occasionally slide away from coding standards (eg, after singing the praises of Doxygen comments earlier in the book, chapter seven contains no code comments at all), but it's nothing too big.

I was very happy to read through this book. It's well written by competent authors. It gets me excited to write some custom code of my own for Drupal 7. While there's not too much that will serve as a desk reference within the book (the authors are quick to point us to api.drupal.org, early and often), Drupal 7 Module Development is a worthy addition to the shelf and serves as a wonderful introduction to coding for Drupal.
Comment | 
Was this review helpful to you?
13 of 13 people found the following review helpful
3.0 out of 5 stars Objectively poor, relatively good July 29, 2011
Format:Paperback
Drupal documentation is severely lacking, on the whole. That's why I thought I needed a book written by experts to pull the morass of Drupal documentation into a comprehensible structure. For the earlier chapters, the book did relatively well, providing D7-specific instruction on the Form API, entities, the Field API, and the theme layer, among others. However, as I wrap up my reading of the book with Chapter 10, on JavaScript in Drupal, I feel severely shortchanged. The example of AJAX used outside of a form using the 'use-ajax' class is essentially copied from [...] sans comments and WITH ERRORS!!!! The API got it right, but this book didn't! The errata for this book is a joke; I found multiple errors in the code whereas the errata seems only interested in minor grammar edits for the explanations. I'd much rather the code be right than the explanations' grammar.

Specifically, the error that I find particularly upsetting is the code snippet on page 308 that is also present in the hello_world.module sample code available to download from [...].

$page = array('#type' => 'ajax_commands', '#ajax_commands' => $commands);

^^ this is incorrect. The correct value for the '#type' key, given by [...], is 'ajax', not 'ajax_commands', and the correct second key isn't '#ajax_commands' it's '#commands'. Once these corrections are made the code works; without them it doesn't.

The fact of the matter is that relative to the quality of other Drupal documentation, this book is great, so I still recommend it. It's also possible that the API changed between this book being published and now.
Was this review helpful to you?
13 of 13 people found the following review helpful
5.0 out of 5 stars A Must-Read for Serious Developers March 26, 2011
Format:Paperback
While I consider myself well-versed at the front-end theme aspects of Drupal, I had been wanting to delve a little deeper into its underpinnings, if only to understand how modules work. Deconstructed, Drupal is essentially a series of modules working together -- be that "core," the bare CMS -- or "contrib," third party modules available for download from drupal.org. So, in an effort to bolster my skill set, I recently read Drupal 7 Module Development, from Packt Publishing and found it to be an excellent resource.

If you have more than a passing interest in Drupal, then you are probably aware of the significance of such a talented group of developers collaborating on this book. The author list reads like a veritable who's who in the subculture of Drupal...

* Matt Butcher
* Larry Garfield
* John Wilkins - aka John Albin
* Matt Farina
* Ken Rickard
* Greg Dunlap

Matt Butcher works for the New York Times Company on their ConsumerSearch site. Greg Dunlap works for NodeOne, an agency in Sweden. The rest of the authors are heavy hitters at Palantir, a development firm based in Chicago.

This book does not mince words, skipping past the whole installation process, because such information is readily available online anyway. What I like best about this book is that, after the requisite introductory chapter covering the broad strokes, it gets right into building a module from scratch, aptly named First, that outputs a list of all the currently installed modules. Chapter 2 also touches on code standards (covered here), as well as how to write automated unit tests.

Chapter 3 is all about theming, and not just at a superficial stylistic level, but also how to make use of powerful preprocess functions, that allow the theme layer to edit Drupal's output before it reaches the browser. I have implemented such techniques to make my own site HTML5, rather than the default XHTML 1.0.

With module building and theming covered, chapter 4 jumps into how to theme a module, because modules themselves typically output a varying degree of markup themselves, and can (optionally) ship with CSS to handle any custom styling. Also covered is consideration for languages that read right to left, as internationalization has been a priority even since the earliest days of Drupal. Such cases should not be overlooked if you intend to make your module publicly available for reuse.

Chapter 5 draws back the curtain a bit, so to speak, venturing into the administrative interface. Some modules do not actually affect a site's public look and feel at all, but instead are built to facilitate a content creation workflow and/or user management. This chapter covers how to write an admin module that makes use of Drupal's email API, sending the user a warning message if he or she is deemed to be in violation of the site's terms of service.

Chapters 6 and 7 cover how to work with custom content and field types, using artwork as an example of a special type of content (ch. 6), with the dimensions of each piece of artwork necessitating a custom field type (ch. 7). The authors are quick to point out that Drupal itself is versatile enough to handle such cases, without needing a custom module. However, they chose this as a faux case study, simply to explain building modules that handle custom content and fields.

Chapters 8 and 9 cover permissions and security, as well as node access. One thing I have always appreciated about the community of developers around Drupal is the dedicated security team. Chapters 8 takes the same mindset, that any anonymous site visitors could potentially be nefarious, and explains the best ways to ensure that you are not leaving your site vulnerable due to exploit vectors in your module. Additionally, chapter 9 talks about conditionally showing content to various user tiers, depending on if they have the necessary credentials to view it.

Chapter 10 is all about JavaScript, explaining that Drupal makes jQuery and jQuery UI available to you as a developer. For instance, via jQuery, Drupal automatically adds a draggable handle that makes any <textarea> resizable in all browsers, even those that don't natively support it. When building your own modules, you can also tap into the convenience that jQuery affords. This chapter covers how to employ an Ajax approach to forms, rather than doing a full round trip to the server to refresh the entire page. It also touches on how to add translation via Drupal.t(), the JavaScript equivalent of Drupal's PHP function t().

In chapter 11, working with files and images is explained. Whereas previous versions of Drupal required an additional module to be installed in order to manipulate images, as of Drupal 7, this functionality is built into core. As a module developer, you can tap into the native Image API, allowing users to manipulate graphics via a web interface. The authors explain the process of adding a watermark to a photo, as well as how to desaturate, rotate, and resize images.

You will love chapter 12 if you build a lot of Drupal powered sites, and find yourself repeatedly setting your preferred defaults each time. While not about module development, per se, it covers how to bundle modules and site configuration into what's called an "install profile." This allows you create a custom installation of Drupal, preconfigured with everything you would normally have to do anyway.

Basically, this book leaves no stone unturned. As if the aforementioned chapters weren't already enough, at the end of the book, there are two appendices that cover databases and security, to be used more as a reference than a tutorial.

I would recommend Drupal 7 Module Development to anyone who has familiarity with building sites in Drupal, but wants to take their prowess to the next level. The collective expertise imparted in this book simply cannot be overstated.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
4.0 out of 5 stars Nice book
But I would like to see more complete functions description like in Bjarne Stroustrup's amazing book "The C++ Programming Language".
Published 2 months ago by Artem Kuraev
4.0 out of 5 stars Knowledgeable author, dense material
The author is very knowledgeable, and explains how various hooks work while taking you through some of the Drupal internals along the way. Read more
Published 6 months ago by R. Chen
3.0 out of 5 stars Kindle version is lacking correct formatting
Sorry to be brief here, but I just wanted to let people know that the Kindle version of this book has serious formatting issues. Read more
Published 14 months ago by Adam Courtemanche
2.0 out of 5 stars Not a Good Presentation for My Learning Style
There is no doubt that the authors are experts in Drupal 7 Module Development, but that doesn't make them good teachers, at least for my learning style. Read more
Published 14 months ago by M. Taylor
5.0 out of 5 stars The missing manual
I've been using Drupal for 2 1/2 years and it still holds many mysteries for me. The online documentation is a valuable resource but it is for the most part very fragmented and... Read more
Published 16 months ago by Raccoon Face
3.0 out of 5 stars no proofreading?
This books appears to be set up well.

But as I progress, I encounter more and more text-errors. Apparently, no proof-reading was done on this manuscript. Read more
Published 18 months ago by I. H. Renkema
5.0 out of 5 stars Drupal 7 Module Development
Great guide to developing modules for Drupal 7. The examples where very helpful to me. I had tried to navigate through the online documentation with little success. Read more
Published 22 months ago by Chris
3.0 out of 5 stars Good content, terrible editing
The content is easy to read, and fairly easy to understand if one has some prior familiarity with module development. Read more
Published on May 4, 2011 by J. Warner
5.0 out of 5 stars Great Drupal 7 book for developers
The biggest issue with Drupal is understanding all the wonderful complexity going on under the hood. Read more
Published on April 27, 2011 by tedserbinski
5.0 out of 5 stars Highly Recommended
If you are serious about Drupal 7 development, this is a must have. Like the other reviewer I have alot of Drupal books, but this is simply my favorite. Read more
Published on March 10, 2011 by kuson
Search Customer Reviews
Only search this product's reviews

What Other Items Do Customers Buy After Viewing This Item?


Forums

Topic From this Discussion
Best Drupal book ever? Be the first to reply
Have something you'd like to share about this product?
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Search Customer Discussions
Search all Amazon discussions


So You'd Like to...


Create a guide


Look for Similar Items by Category


Want to discover more products? You may find many from drupal 7 shopping list.