Pro Drupal Development 112
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 |
pages | 428 |
publisher | Apress |
rating | 9 |
reviewer | Michael J. Ross |
ISBN | 1590597559 |
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.
relatively excellent? (Score:3, Funny)
Nice term... So, depending on the base, the same thing could also be called relatively shitty, or relatively mediocre? Indeed, it can...
Everything is relative, is not it? So why say it?
Re: (Score:1)
Re: (Score:1)
Re: (Score:3, Interesting)
I have tried Joomla (on crack. I just don't quite understand how the people using it can call it intuitive), Mambo (see my Joomla snide comment), PostNuke (rocks, pure and simple. Very Free), DotNetNuke( pretty good, more stable than postnuke, slightly. Free, but apps usually cost) and most recently, Community Server.
I freaking love community server personal edition. free. fair docs, but you don't need 'em. stable. can't expand it easily, but it comes with a blog, file, photo, forum,
Re: (Score:1)
I'll have to check out PostNuke and Community Server. But I noticed on its Wikipedia page that it's
http://en.wikipedia.org/wiki/Community_Server [wikipedia.org]
I'm focused right now on PHP/MySQL packages. What do others like and why? (Do "community server" and "content management system"
Re: (Score:2)
Postnuke is fun. I've been playing around with this whole web thing since around '95-'96, and tried a lot of different things; PostNuke seems to be the best "platform" I've seen, it is powerful, and very, very easy to embed
Re:relatively excellent? (Score:5, Informative)
I like Drupal. It has a dedicated security team. That helps me sleep at night.
I like that each bit of HTML content that Drupal puts out (like the user login form, for example) and be easily overridden or modified without changing any core code (I just make a template file and do it there and Drupal automatically sees it).
I like that the output from Drupal is already in semantically meaningful CSS classes. If I want to tweak the way the breadcrumbs look, I just override the breadcrumb class in my own style.css file. Ditto for titles, menus, etc.
Re: (Score:3, Informative)
Hadn't heard of community server. Now I know why :
Re: (Score:2)
Re: (Score:2)
So I'm not platform agnostic either (although arguably I have a wider choice of platforms in Unix land).
Re: (Score:2)
For administration, Drupal 5 is another disaster. Nothing is organized logically, where as it is in Joomla and PostNuke. Granted, there are more modules for Drupal (which is what originally got
At least one thing is not relative. (Score:2)
So I told him, "get a job, you hippy!"
Re: (Score:1)
Joomla For the Win (Score:1)
With my personal statement said... I have nothing a
Re: (Score:2)
Suppose you have a house and you are looking to do some work on it, you know facelift, upgrade
Re: (Score:1)
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
Re: (Score:2)
Joomla doesn't let you do much without editing core files, and that's a security and maintenance *nightmare*.
Re:Joomla For the Win (Score:4, Informative)
Drupal, on the other hand, is extremely well written as Dries is very strict about submissions to the core. I know Drupal inside and out and that's only possible because it's very well written and documented. An entire site is dedicated just the automatically generated API documentation.
Re: (Score:1)
When I went looking in 2003 for a pre-built CMS to supplant the simple LAMP-based site I had written for a small non-profit, though Drupal looked like it could have all sorts of power someday, I could see that I could build them a fully featured site with Mambo in less than a month's worth of nights n' weeke
Drupal beats every other CMS (Score:2)
Drupal, on the other hand, is extremely well written...
Yup. I work for an ISP and I've installed and configured about eight different CMS's, not counting shopping-cart systems.
Drupal is the only one I've seen whose internals are reasonably clean and straightforward.
In every other case, when I looked at the code, my immediate reaction was, "I should rewrite this; It's too sloppy to maintain."
In many cases I had to edit nearly half the files just to eliminate unassigned variable warnings, or to turn off the Register_Globals option, or to make it work in "Safe
Re: (Score:2, Informative)
That's not to say Joomla is bad -- in fact, it's very good, and like you said, 1.5 could bring a revolution in CMS = Framework -- but many of the advances 1.5 will make have already been realized in Drupal 5.
In addition, the shear number of extensions for Drupal combined wi
Re: (Score:1)
Re: (Score:1)
No, you cannot.
Re: (Score:1)
having just been unleashed soon? (Score:2)
Re: (Score:2)
Re: (Score:2)
Glad to See (Score:4, Funny)
reviewer is paying
attention the ample
margins throughout the
book. It helps me
make a purchasing
decision, I really
only ever buy books
with good margins.
M
Re: (Score:2, Funny)
. . someone is paying attention to
. . . . the Live Ink [venturebeat.com] text formatting.
It makes text
. . so much easier
. . . . to read!
"logically organized"? (Score:2, Offtopic)
Re: (Score:1)
Doesn't organization imply logic? The sheer fact that something has been organized pretty much means put into logical groups. Whether everyone can immediately see or understand the logic is another topic.
Now, that's pedantic!
Re: (Score:1)
The best interfaces are logical, and expose the logic as intuitively and quickly as possible. I guess the problem is working out what someone will be able to interpret quickly. Case in point: icon-only control systems may take up less space, but unless the pictures actually represent something the user already knows about, they are less easy to i
Closed comment (Score:1, Troll)
However Timesprout failed to use lay-flat text for his comment and it flopped closed as soon as it was posted which means no one can read it unfortunately.
Slashdot Ed.
Drupal on Dr. Dobbs (Score:5, Informative)
MediaWiki (Score:4, Interesting)
What I don't like about Joomla and all those WYSIWYG [wikipedia.org]-Editors is, that the homepage is not standardized. Every editor has his own way of formatting and making headlines and so you get many pieces instead of _one_ homepage. With MediaWiki you just enter
== Headline ==
and every headline looks the same.
IMHO, MediaWiki is a great choice, particularly if you have more than one editor.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
I like pmwiki, it's simpler then mediawiki.
Whitespace (Score:2)
I haven't read the book, so I don't know which direction they have gone, but this either means that they are following or breaching the Drupal conventions for code formatting. Drupal has an entire document on coding standards [drupal.org], and someone who HAS seen the book could perhaps comment on whether the examples follow the standards or not...
Re: (Score:2, Informative)
Re: (Score:3, Informative)
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
Oh wait, they're not. Troll.
Re:Drupal Optimization == oxymoron (Score:4, Interesting)
http://www.mtv.co.uk/ [mtv.co.uk]
http://www.theonion.com/ [theonion.com]
http://dead.net/ [dead.net] (The Grateful Dead site)
http://goingon.com/ [goingon.com] (Forbes. Yes, that Forbes.)
http://playboy.de/ [playboy.de] (Playboy Germany, NSFW)
http://www.fighthunger.org/ [fighthunger.org] (The UN)
And that's just the first few I remembered. Drupal scales just fine if you know what you're doing. If you don't, then you won't be able to make anything scale.
Re: (Score:1)
Another thing: even the inventor of the HTML -- Tim Berners Lee -- uses Drupal for his personal Blog (http://dig.csail.mit.edu/breadcrumbs/blog/4 [mit.edu])
Re: (Score:2)
We've been using Drupal for over a year now. Both small and medium sized projects. It's just a really really good framework. Possible -the- best right now.
Since you didn't bother to actually show any examples of what "sucks so much" I won't bother to make any arguments for why "it rocks"
Re: (Score:2)
Just discovered Drupal (Score:4, Informative)
I just tried Drupal for the first time a few weeks ago whenever Google was having problems with their personalized site and I wanted to make a self-hosted equivalent. I have to say that it's just about the slickest CMS I've played with. I installed a couple of modules, configured everything through the web admin, and got my own personal My Yahoo! workalike.
I liked Plone but it always felt over-engineered and sluggish. Drupal, on the other hand, seems light and quick. I don't really have much else to add the the conversation, except to say that it's worth trying if you're looking at CMSes.
Re: (Score:2)
Re: (Score:2)
Well, I love Zope, or at least like it an awful lot. I "get" Plone. But it seemed like the opposite of its goals, like a giant interdependent ball of dependencies. Drupal was such a breath of fresh air. Want stock quotes? Install the stock quote module and add it to the lefthand column. I'm always a little skeptical of PHP-based projects because so many of them are awful, but Drupal seems like a very decently engineered package. Plus, those sub-second page load times without setting up ZEO clusters a
Oh CMS up yours.. (Score:1)
Found PHPwebsite, set it up on our development website, asked the staff t
IBM tutorial (Score:1)
http://www-128.ibm.com/developerworks/ibm/osource
e107? (Score:1)
For those of you looking at CMSs... the site Open Source CMS [opensourcecms.com] is an invaluable resource. They allow you to demo all of the popular choices and choose which one you like the best.
Re: (Score:3)
Re: (Score:2)
Yeah, that's what I care about in that photo, the CMS...right.
Drupal version? (Score:2)
Re: (Score:1)
Re: (Score:1)
Re: (Score:2)
Ummm, you could read the review :-) :
Some additional comments on the book and Drupal (Score:1)
I got the book and it has been helpful in distilling down the massive amount of information available about Drupal development. I see Drupal's strength as a framework for building your own applications on top, due to the design of the module and add-on system. I've also used Joomla/Mambo and both can provide a strong CMS for your website. The primary difference lies in whether you want an as much out of the box functionality as you can get (Joomla/Mambo) or if you want some out of the box functionality with
Off-topic Drupal question (Score:2)
I just bought the Nintendo DS Browser (Opera), and the sole problem I have with it is that it doesn't store passwords or cookies. Is there a way to bookmark a login URL for Drupal so that I don't have to manually log in each time? I've tried replacing the POST with a GET in the normal login form, but I'm guessing that it expects some cookies to be set before you can actually submit that.
Bonus points and a case of beer for anyone who knows how to write a Squid plugin to store and transmit cookies on a pe
SilverStripe CMS, Drupal & Joomla (Score:1)
Re: (Score:2)
I don't queston its quality (hell, I haven't even tried it). But still:
There was this web company who was sick of every web company having their own CMS, so they made their own CMS?
Re: (Score:1)
Re: (Score:2)
Experiences of drupal (Score:1)
Re: (Score:1)
1. Check the latest stable branch out of cvs:
cd htdocs
cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs
2. Create an empty database in MySQL.
3. In your web browser, go to http://example.com/drupal/install.php [example.com] and run the web-based installer.
Secondly, "finding your own posts on the forums can be a nightmare." Here's a complicated algorithm that may help you. Hang on, this is tough:
1. Log in.
2. Click on "My recent po
Re: (Score:1)
Re: (Score:1)
Re: (Score:1)
Re: (Score:1)
Actually most of the Drupal sites I see are complex. Because of Drupal's modularity, you can just plug modules in to add complexity.
Maybe what you need is a good book on Drupal's architecture and how it works so you can "get it to do something useful." Oh, wait! I hear there's one out now. Where did I read that again? I think it was on Slashdot somewhere.
Re: (Score:1)
Drupalbook.com (Score:1)
Re:I've said it before and I'll say it again (Score:4, Funny)
Real web developers make their sites using Assembly! Screw those lame high level languages.
MySQL? Bah! I store my databases in txt files like a real man.
Re: (Score:1)
Dude! You need to write a book called: "Programming the Web for Real Men."
It could a whole series of books! Like: "PHP for Real Men!" or "Buddhism for Real Men!" or "Emotional Healing for Real Men!"
You're sitting on a Goldmine! I tell you!
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re:I've said it before and I'll say it again (Score:5, Funny)
Re: (Score:1)
Re: (Score:2)
Text files?! Pfft! That would imply a file system. REAL databases are stored on paper tape!
Kids! *sigh* Now get off my lawn, you brats!
Re: (Score:2)
Alternatively, you could park the whole thing behind a Squid reverse proxy, or even use Apache's own caching. One tenth the effort and all the performance.
Re: (Score:2)
No, I think you did. The dead easiest way for any CMS to make static pages is to put a proxy server in front of it. A visitor requests foo.php, the proxy saves the output to disk, and the next visitor gets the cached ("static") copy.
This has huge advantages. First, you don't have to to pre-generate every single page on your site whether it's going to be served or not. Second, the cache doesn't expire everything simultaneously so your CMS can idle along happily only gener
Re: (Score:2)
However, I'm starting to think a wiki is the best way to go.
Re: (Score:2)
Two ways: