Michael J. Ross writes "If a Web site needs to be developed as quickly as possible, or it needs to support collaborative content, then usually the best approach is to use a content management system (CMS). There are many CMSs from which a Web developer could choose, including Drupal, which is considered by many to be the most powerful, extensible, and logically organized of them all. Installing Drupal and using it to create a simple site, is fairly straightforward, in part due to its relatively excellent documentation. For much of its existence, there has been far less information available on how to extend a Drupal site with one's own modules, themes, blocks, etc. That need is now met by a new book, Pro Drupal Development." Read on for the rest of Michael's review.
|Pro Drupal Development|
|author||John K. VanDyk and Matt Westgate|
|reviewer||Michael J. Ross|
|summary||A detailed guide to customizing a Drupal-based Web site|
The book was written by John K. VanDyk and Matt Westgate, both of whom are experienced computer programmers, who years earlier had created their own CMS. In their book's Introduction, they confess to discovering Drupal and its many advantages, switching over to it, and presumably abandoning further development of their own CMS. This speaks volumes about their regard for Drupal, because an individual programmer or programming team can give no greater vote of confidence for a technological product than to voluntarily end primary allegiance to a competing product that they themselves birthed and nurtured.
Pro Drupal Development was published by Apress, on 16 April 2007, under the ISBNs 1590597559 and 978-1590597552. The publisher offers a Web page on their site dedicated to the book, where the visitor will find all of the book's source code, as well as the table of contents and a sample chapter (Chapter 8 — The Theme System), in PDF format. In addition, there is a link for errata, which leads to the authors' own book site. At the time of this writing, there are three dozen entries, contributed by the authors and their readers. The authors' site also has links for downloading the source code by individual chapter, and a blog that focuses on the book.
The book's material, spanning 428 pages, is organized into 23 chapters and two appendices. Unlike the majority of technical books nowadays, this one does not have the chapters organized into labeled parts. Nonetheless, the chapters and appendices roughly fall into three categories: how Drupal works (Chapters 1, 19, and 23, and Appendix A), how to customize it (Chapters 2-18 and 22), and how to optimize your Drupal development efforts (Chapters 20-21, and Appendix B). The customization chapters cover a wide range of topics: modules, menus, databases, users, nodes, themes, blocks, forms, filtering, searching, indexing, files, taxonomy, caching, sessions, jQuery, localization, and optimization.
Each one of these topics is explored in laudable detail, with plenty of sample code and figures to illustrate the key concepts. The greatest strength of this book is the depth of its coverage, and the methodical way that the authors go about presenting the material. They are clearly quite serious about Drupal itself, and about conveying to the reader all of the knowledge that they believe is important for the reader to master. In fact, anyone attempting to read the book cover to cover might find the presentation quite dry, with no evidence of humor or even a sense of fun, unlike so many other recent programming books. On the other hand, one can argue that the value of this information alone to the reader who is equally serious about mastering Drupal, should be sufficient. Regardless, be warned that this is definitely not a book that one can read through at a fast pace, absorbing the bulk of the information. The innards of Drupal alone make it a challenging subject for dissection; learning how to modify Drupal's behavior, is even more so.
Yet if anyone is interested in mastering the inner workings of Drupal, and how to customize them, this is the book of choice. It may be a bit dry, but it is quite meaty, and the material is clearly presented. Moreover, the publisher, Apress, has done an admirable job with this title. The layout is clear; the index is substantial; and, as with their other titles, they offer two different versions of the table of contents — high-level, listing the chapter titles only, and detailed, listing the sections and subsections within those chapters.
Another aspect of this book that I applaud is the efficient use of page space, through the use of top and bottom margins that are noticeably smaller than those found in the typical computer programming book. This is especially true of the bottom margins. For instance, on page 117, the text comes within one centimeter of the bottom edges the page — something I've never seen before in a professionally printed book. At first it might strike one as sloppy, but actually should be appreciated by anyone who is tired of technical books using excessive margins for padding out a much more limited amount of information into an even greater number of pages. This is a practice that I would recommend to all other publishers, technical or otherwise.
However, the book does have some weaknesses, which is probably to be expected in any first edition. The sample source code in many cases could benefit from more use of whitespace — particularly for the PHP code. But with any code found in a book, there is always the possibility that such instances of compressed code result from a conscious decision given the limited width of the printed page. But in most such cases in this book, that reason would not be applicable.
The authors do not warn the reader that a solid understanding of PHP is needed for using the book's ideas and sample code. Near the end of the Introduction, they suggest that if the reader is new to Drupal, then he or she should read the chapters in sequence. The authors should also note that if the reader is new to PHP, then it would be better to first get up to speed on PHP before trying to digest and make use of this book. Such points might be obvious to most readers, but they should be clarified up front, perhaps in the Introduction, for the benefit of anyone browsing this title in a bookstore, and wondering if they already possess the technical know-how required by the book.
Similarly, the authors also do not mention that the book is, for the most part, only applicable to Drupal version 5, and not version 4 or earlier versions, since there have been some dramatic changes with the release of version 5. In fact, given the extent of the changes and how that would impact the utility of the book depending upon what version of Drupal the reader is using, it should be noted on the book's cover, as an increasing number of publishers are doing.
A couple of minor problems were in evidence in the first dozen pages. On page 3, the authors refer to "user 1," which is likely to confuse most readers, because it looks like a username, and would be unfamiliar to someone who has installed Drupal and created a Web site, without extensive reading of the Drupal documentation. On page 11, the authors discuss core modules, and where they can be seen listed in the administration area of Drupal. But the path that they provide, "sites/all/modules," is incorrect, because that is where user-added modules are placed, of which there are none in a default installation. (The second mention of that path, in the fourth paragraph, is correct.)
Lastly, when the book is opened up to any of the pages not near the center, the book immediately flops closed. The use of lay-flat binding is strongly urged, for future editions of this book and all others that Apress offers.
Despite these weaknesses — all of which are fixable — Pro Drupal Development is strongly recommended for any PHP programmer who wants a truly in-depth look at how Drupal works and how to make the most of it.
Michael J. Ross is a Web developer, freelance writer, and the editor of PristinePlanet.com's free newsletter.
You can purchase Pro Drupal Development from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.