Best Drupal modules, best practices

strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /home/chaosmin/secure_html/sites/all/modules/views/modules/node/views_handler_filter_node_status.inc on line 13.

This is an attempt to give a practical overview of putting together a working Drupal web application. A given Drupal instance is a webserver plus database back-end, runing Drupal core plus (very presumably) a quite-particularly-configured set of third-party modules, custom theme and style information, with data (the contents of the website) plugged into it. Frequently, more than half the battle is in picking the right set of modules that provide the right functionality while playing nice with each other, and getting a properly customized theme to interact with all of that in a reasonably attractive and stable way.

Toward that end, there are different installation profiles (sometimes called "distributions") of Drupal which endeavor to get people down the path of a stable stack for a particular purpose. The most popular examples are OpenAtrium (the "Organic Groups" workgroup-centered distro), OpenScholar (the academic distro from Harvard) and the Acuia stack (Acquia's "social business website" distribution). Rather than producing a be-all end-all product which people can simply download, it may be better to produce a shared understanding of best practices based on some of the best the industry has to offer--including and especially those three Drupal installation profiles--so that individuals within our academic context can pick and choose the right approach toward site-building.

As many modules are not yet ready for production use in Drupal 7, this discussion will center on the particulars of building a Drupal 6 site, although it should be noted that frequently seeing what has been pulled into core with D7 will essentially mandate what should be considered best-practices with a D6 system. (For instance, few things will prepare the userbase of a D6 installation for a future D7 upgrade than the combination of the "Administration Menu" and "Vertical Tabs" modules along with the "Rubik" theme for system administration. As we are responsible for supporting our end-users, reducing training time and complexity is not an insignificant concern!) Having said all that, let's begin.


Modules required should be considered in terms of functional clusters. The bulk of the "heavy lifting" in terms of generating structured content within almost every Drupal site in existence always comes down to the tag-team partners of the "Views" and "Content Creation Kit" (CCK) modules. CCK gives you your custom content types (and custom field types) and Views gives you (most of) your custom views of structured information. URLs are typically then formatted to give the appearance of old-school folders hanging off the root of the webserver (producing clear sections, such as "news" "sports" "weather", etc.) with the powerful combination of Token, Taxonomy and Path.

--not happy with that last sentence: token of course does much more, and taxonomy can interact with Views in very rich ways beyond simply supplying more comprehensible URLs...---

Another "functional cluster" would be a set of modules around image-handling. Here the undisputed core functionality is provided by FileField and ImageField in conjunction with ImageAPI and ImageCache. Fancier outputs may then be achieved with the popular ImageSlideshow or Lightbox2 modules. There is, both fortunately and unfortunately, a richly complex and deeply confusing ecosystem of modules handling all the myriad ways one might want to manipulate (and mangle) your display of photos within a Drupal site...

Many of these functional clusters of modules are packaged together with something called Features, which more advanced Drupal designers are encouraged to explore.

Simple user inputs, or interactions with nodes, tend to revolve around the VotingAPI module in conjunction with FiveStar, while more complex user feedback tends to center around the WebForm module.

Printer, e-mail and PDF versions can be produced quite easily with the third-party Print module.

More complicated page layouts will be beyond the present scope of this discussion. Most solutions here require the Chaos Tools suite of third-party modules to funciton. The most popular ways to style the layout of pages (just short of hacking your own theme) involve some combination of Pages, Panels and Spaces.