New Drupal 5 shines

33

Author: Michael Stutz

It’s been five years since Drupal, the popular GPLed Web development framework, has had a major version release. The new Drupal 5, which debuted in earlier this month, was eight months in development and incorporates more than 1,000 patches from nearly half as many contributors. It also features overhauls and updates in system performance, usability, user interface, and theming.

The only requirements for Drupal 5 are a Web server, PHP (4.3.3 or greater), and either a MySQL or PostgreSQL database. PHP’s XML extension has to be enabled if you want XML services such as Jabber, and Apache’s mod_rewrite is also necessary if you want to have “clean” URLs — and you probably do.

You can be up and running with Drupal in less than five minutes because installation is basically instantaneous. Once you’ve made a new SQL database for your site, you just have to extract the Drupal 5 sources into your Web directory, which is a quick wget and tar operation. Then you open a browser window to your site’s root page and complete a form to configure Drupal to work with your database. If your database is hosted on another server, you have to click “Advanced options” and give the hostname. The only snag I encountered was that Drupal needed write permissions to the file /sites/default/settings.php, so I had to chmod it (and then chmod it back once installation was complete, because otherwise it’s a security risk).

This new Web-based installer is easy to use. You’re given a “Welcome” page with a five-step menu that explains everything you have to do in order to get your site going, beginning with creating your main administration account. You’re assigned a random password for the account, but you can change it later.

After this you follow links to configure the system, enable any extra modules, change the theme settings, and then add actual content to the site. It’s best to open these links in new windows, so that you can go back to the menu when you’re done with each step.

A great new look

Drupal installation Web interface – click to enlarge

If you’ve ever used Drupal before, the first thing you’ll notice is the great new look. This is the new default theme, Garland. It really looks like pro software, and WordPress must have thought so, too — they quickly ported it, even doing so a month before Drupal 5 came out.

You can configure Garland in various ways through the Web interface, most impressively by picking a whole new color scheme with a color selection tool. This is a real advance on typical CMS theme customization, where at best you select a few buttons on a Web form. The color selector actually feels like you’re working inside a real application, and I hope it’s a model for themes to come.

While Drupal 5 comes with a handful of themes, none are as advanced as Garland yet, and you’ll undoubtedly find compatibility issues with themes designed for older versions. Some 5.0 themes are showing up in Drupal’s themes area as well as in the Drupal pages on Themebot, but the showcase Drupal Theme Garden has come to a close.

New themes are installed in Drupal 5 by downloading a theme tar archive and extracting it into your themes directory. That’s all it takes for the theme to show up in the administrative Web interface, but it would be nice if there was a way to install and uninstall themes from the interface.

Usability and interface

Garland color selection picker – click to enlarge

Dozens of improvements went into the administrative interface in Drupal 5. For instance, it’s much easier to make sweeping changes across comments (such as deleting spam) with the new “select all” feature. You can sort the view either by task or module, and an “advanced” view is provided with a setting that lets you hide descriptions. While it isn’t perfect, it’s better than most systems, and is looking more like a real application than an elaborate Web script. Logging is displayed with easy-to-read, color-coded tables, and you’ll notice that if something ever goes wrong, or if something isn’t installed right, you’ll get an intelligent error message, usually boxed in red on the main administration page and on a separate “status report” page. This was an idea that Drupal developer Steven Wittens says was influenced by Mac OS X.

Drupal is frequently used on sites that offer user registration (it supports comments, a forum, and features for group collaboration), and administrators will find thorough and fine-grained user access control in Drupal 5 — you can even control which modules are accessible to users by defining their “role,” which by default is set up with options for anonymous or authenticated users. You can also use the taxonomy access control module to restrict access to whole branches of your site, or to content tagged with certain terms; this is good for making subscription-based sites or for selling site content.

The jQuery JavaScript library has been included as part of Drupal’s core. Among the many changes in handling modules is the creation of install profiles, which let you preselect and configure a set of modules to make a customized Drupal installation — what has been called “module mashups” by developers.

But as with themes, the module pages have changed considerably. Old modules will have to be converted or rewritten to work with Drupal 5, and many of the official modules still haven’t been converted yet; even Drupal’s popular shopping-cart solution, the ecommerce module, isn’t available for Drupal 5.

Performance

On a high-traffic site, Drupal’s CSS-backed pages can be a performance concern, so a lot of changes went into Drupal 5 to address that. There’s a caching option now — if turned on, Drupal serves cached pages to anonymous users. It also has a built-in CSS preprocessor that aggregates and compresses CSS files. This is useful because Drupal relies heavily on its own CSS files, and each of these files is a separate user request. Because of that, if you have a popular site, you can soon find that your server is getting bombarded. This option combines the CSS and HTML in a single request, and helps considerably with load time.

Another improvement is the change to error reporting pages, such as for 404 or 403 errors. You can set up your own plain error pages without all of the extra Drupal layout, and you can customize the message displayed in “off-line mode” when you’ve taken the site down.

Documentation and community

Documentation is available online in the Drupal handbooks, which are sorted by major task, but the documentation still feels a little lacking. Part of the problem is that all the versions are jumbled together — deprecated versions share the spotlight with instructions for 5.0. And if you try to follow along with the various documentation, you’ll find that important details are sometimes left out, and many Drupal terms used in the manuals are either defined self-referentially or so imprecisely that as a Drupal newbie you know you’re not getting the whole story.

Installing and running Drupal is fairly easy now, but configuration of a first-class site still takes work and ultimately a programmer’s hand — you have to know your PHP and CSS, and you have to spend time learning how it all interacts in Drupal, which will inevitably cause you to get involved with the various community sites, such as Drupal Groups (which just passed 10,000 subscriptions) and Drupal’s main forum. In addition, Planet Drupal is an aggregate of feeds from Drupal-related sites.

A good thing gets better

Drupal’s dynamic taxonomy system for content categorization has always given it an edge as a content management framework, and the changes in Drupal 5 have been real improvements over its previous version.

But almost as important as what’s gone into Drupal 5 is what’s coming in Drupal 6, which is now in development. Some exciting and important features (including internationalization) won’t be ready or officially supported until that’s ready, though it’s not clear when that will be, as the project is offering no expected release date.

Category:

  • Enterprise Applications