Table of Contents
To my parents, John and Helena Kane, who made huge sacrifices in order to guarantee their childrens educations. To my son, Guillermo, who has taught me so many things. To my loving life partner, Elena, who shares with me life, love, and struggle, and who has taught me the meaning of determination; and to all our sisters and brothers.
About the Author
Victor Kane is a process engineer and system architect who focuses on mentoring services and Agile approaches to web application development. For the past several years, Victor has been building website applications and helping others to do so using the Drupal CMS Framework, with an emphasis on building a cookbook of proven recipes capable of meeting modern requirements, based on best practices and a test-driven approach to application construction.
Victor has been an active participant in the Drupal community, with its forums, locally based Drupal groups, and Drupal camps and conferences, and is a proud graduate of the Drupal Dojo knowledge sharing group originally founded by Josh Koenig on http://groups.drupal.org. Since then he has frequently shared his experience and insights on his personal blog, http://awebfactory.com.ar.
Credits
Executive Editor
Carol Long
Development Editor
Maureen Spears
Technical Editor
Joel Farris
Dan Hakimzadah
Benjamin Melancon
Production Editor
Rebecca Coleman
Copy Editor
Cate Caffrey
Editorial Manager
Mary Beth Wakefield
Production Manager
Tim Tate
Vice President and Executive Group Publisher
Richard Swadley
Vice President and Executive Publisher
Barry Pruett
Associate Publisher
Jim Minatel
Project Coordinator, Cover
Lynsey Stanford
Proofreader
Andrew Phillips, Windhaven Press
Indexer
Jack Lewis
Acknowledgments
The Drupal Community at http://drupal.org, who have managed to bring together a hugely talented and motivated network of talent, and who owe their success to their ability to begin to transcend national boundaries, must be acknowledged in first place.
In second place, the unknown and unwitting poster to the forums and handbooks of drupal.org, having provided the answers in the nick of time on countless occasions.
I must acknowledge also the Drupal Dojo group (http://groups.drupal.org/drupal-dojo), an incredibly selfless share the knowledge self-teaching group that started operations in January 2007 and is now getting ready to launch Drupal Dojo 2.0.
Also, I thank the kind people at Wiley Publishing including Carol Long, who helped me make this book a reality, and Maureen Spears, who was my lifeline. In addition, Id like to convey a word of thanks to the technical editors Joel Farris, Dan Hakimzadah, and Benjamin Melancon as well as Robert Douglass of Acquia who all were instrumental in shaping the code and text; as well as Miguel Martinez, of Buenos Aires, who took my photograph for the cover.
All who post. All who test. All who post issues in the Bazaar.
Introduction
Drupal is an Open Source, community-based Content Management System (CMS) and Website Application Development Framework that allows individuals, organizations, businesses, government agencies, and social classes to create interactive, media-based database-driven websites where they can carry out a significant portion of their activities.
What does this mean for you?
Open Source Not only is Drupal a software product readily available free of charge, but it is also licensed under the GPL license. This means, among other things, that its source code is completely open and readily accessible to all. It also means that all upgrades are available free of charge.
For more on the GPL license, see www.gnu.org/licenses/gpl-faq.html#WhatDoesGPLStandFor. For an interesting discussion of how business can make use of GPL-licensed software without having to publish the way they actually put Drupal to use, see http://jeff.viapositiva.net/archives/2006/02/drupal_and_the_gpl_as_i_understa.html.
Community-Based Not all Open Source software is community-based. Some large corporations release a portion of their code under a GPL license, but the user community cannot participate in the production of the code. It is important to understand that because Drupal is actually produced by a huge developer base, with a publicly accessible and tremendously active issue queue, Drupal enjoys a considerable gain in the quality of its software.
Content Management System (CMS) Once installed and configured, Drupal allows an authenticated user granted the appropriate permissions to create, edit, manage, and publish content without any more specialized knowledge than being able to use a modern word processor. And it allows graphic web designers and stylists to alter the look and feel of that content.
Website Application Development Framework Drupal goes way beyond being only a CMS: Off the shelf, it allows for the publishing of dynamic content capable of changing and adapting to different contexts, conditions, or kinds of users. It allows developers to implement web applications based on business objects and listings generated by flexible, real-time queries generated on the fly. And it allows developers to integrate the system with countless external web applications and Web Services in a thoroughly modular fashion.
Individuals, Organizations, Businesses, Government Agencies, and Social Classes In a word, you. You can use Drupal to create a modern, interactive website that can become part and parcel of your day-to-day activities and communications.
But this book is not just about Drupal. It is about leveraging Drupal. It explains the best possible set of approaches toward making Drupal work for you to get your site done right and, as such, views Drupal, together with a series of additional methods and best practices, as a way of getting things done.
By working with this book, you will gain insight into how to work with any of the most recent Drupal releases, and you will learn how to set up shop, how to approach your project using an Agile and test-driven approach to software development, how to plan for deployment, and how to avoid pitfalls along the way.
Whom This Book Is For
This is a book you have to read. This is a book you have to work through, because it is so closely pegged to actually working with Drupal that an all-inclusive index would be longer than the book itself.
It is my earnest hope that the contents of this book may be shared with many kinds of Drupal users. But it must be said that this is neither a book on Drupal programming dedicated only to highly trained technical staff, on the one hand, nor is it a book designed to walk the casual Drupal end-user through its many features although it might benefit both.
However, the problem this book attempts to solve and in this sense, it is perhaps unique is the sad but true fact that the development of any website today involves the ability to master, with at least a practical level of solvency, a huge number of disciplines. You need to be, in a certain sense, the Renaissance kind of person capable of either dealing with or (and this is extremely important) delegating, when you cannot, an extremely wide range of skills. This means that you are very often in the position of needing to get up to speed on a wide variety of issues. This book attempts to bring them into a single, convenient space.