May 22, 2006

Drupal 4.7: Next-generation CMS

Author: Chris Lynch

Drupal is a content management system (CMS) built on the PHP and MySQL combination (detailed requirements here). I've been working with the latest version since its release at the beginning of this month. Drupal 4.7 is a significant upgrade that brings major short- and long-term benefits to users and distributors of the system. It brings Drupal back to the cutting edge of CMS development.

Drupal's strength in comparison to other CMSes is its abstract modular approach to content. Drupal treats all content -- be it a blog post, static page, or your latest podcast -- as a node. Different node types can be mixed together, grouped into categories, extended through modules, and included in customisable RSS feeds. Treating content items in this abstract sense gives Drupal the ability to manage an almost limitless range of content using just its core features, in comparison to other tools that are limited to working with just pages or posts or that require these entities to be treated separately. This abstraction means that, although Drupal cannot boast as large a range of contributed modules as projects such as Mambo or WordPress, each contributed module tends to have a wider range of applications in which it can be used.

Installation and upgrading

Installing Drupal is by no means difficult, although this is one area in which the system still runs behind its competitors. While you can install the majority of PHP-based CMS systems simply by visiting a PHP page and working through an installation wizard, Drupal still requires that you run a database script in your MySQL database and perform some configuration steps manually, primarily by editing a PHP-based configuration file. Though these are not difficult steps to complete, especially given the comprehensive instructions provided both in the downloaded files and on the Web site, they may discourage some users. In some ways, Drupal is still a tool aimed at programmers, sysadmins, and site designers, rather than end users.

Upgrading, by contrast, has been made a lot slicker in this version. After copying the new 4.7 files onto your system (the developers recommend using a new location, rather than overwriting an existing install), you can use the upgrade PHP page to upgrade your existing Drupal database to the 4.7 structure. The upgrade page now uses AJAX to allow you to dynamically select the version of Drupal you're upgrading from, and applies the appropriate changes to the database. There is an excellent instruction video that explains this process in detail, including the sage advice that a full backup of your site should be taken before upgrading.

The major downside to upgrading an existing Drupal site to 4.7 is that any additional modules and themes that you have installed, or indeed written yourself, may not work with the new version due to changes in the Drupal code and API.

About these modules and themes ...

As I've already mentioned, Drupal has a documented, comprehensive API structure that allows you to extend the functionality of the system in many ways. There is a strong development community producing quality modules for a range of applications, as well as providing a wealth of support to new and existing users. Due to Drupal's abstract way of handling content, the comparatively small number of add-ons rarely fails to provide the answer to a problem, although some abstract thinking may be required. Should you find a gap, there is of course always the option of contributing your own code to the project, which is something that the community actively encourages.

Themes, by comparison, are currently in short supply for Drupal, though an impressive array of new themes is being released by the community for version 4.7, and the launch of a mini-site called the Drupal Theme Garden will help users choose from the current library of themes. Personally, I have an aversion to using "cookie-cutter" themes on my own Web sites, but there are some strong designs here, and some that are generic enough to fill a gap just about anywhere. Even if you intend to theme your site yourself, the existing themes provide a rich library of code to reference.

The differences between Drupal 4.7 and 4.6, however, mean that there are now two different lists of modules available for the system. Although there is some support in 4.7 for legacy API hooks, I have had limited success in using 4.6 modules with 4.7, and would not recommend this approach. Modules are being converted quickly to the new API and, again, comprehensive instructions on how to do this are available from the Web site. If you are truly desperate to get to 4.7, you can upgrade that "must-have" module yourself.

One important change is the new ability for modules to install themselves when they are activated. Installation of a Drupal module was previously a three-step process -- first, the module was downloaded and copied into the /modules directory, then any SQL scripts were run, then the module was activated through the Drupal front end. In 4.7, any DB changes or minor file activity required by the module are processed by the module itself when it is activated. This is a valuable feature if you intend to host sites for users in Drupal and want to provide a wide range of modules to them without having to manage all of the database changes that go along with this, or want to be able to create new Drupal distributions without having to alter the primary install scripts.

What's new and different in Drupal 4.7

As the what's new in Drupal 4.7 video puts it, one of the main things that you get in Drupal 4.7 is "buzzword compliance." The key buzzwords flying around are AJAX/Web 2.0 and podcasting.

I've already mentioned the use of AJAX in the Drupal 4.7 upgrade wizard. Drupal 4.7 not only ships with a small set of AJAX "widgets" but also has comprehensive instructions on how to produce your own AJAX bits and pieces, using the modules framework, to plug in to the system. Worthy of special mention is the use of AJAX when categorising your content nodes, which I'll discuss below.

Podcasts have received special attention, with support for RSS inclusions making it easy to attach an MP3 podcast to a node. This is an area of ongoing development for Drupal, with the audio module from Drupal professionals extending this even further.

Of course, if you are installing or running a CMS, then the most important features are those that let you manage content. Drupal 4.7 has improved by leaps and bounds in this area, most notably with significant extensions to the already powerful category/taxonomy and menu systems.

Drupal 4.6 allowed users to create complex, hierarchical, and interrelating category structures into which to place their content. Nodes can be placed in one or more categories in multiple taxonomies, and these categorisations can be used by visitors to the site both to navigate content and to create specific RSS feeds for content that interests them.

In Drupal 4.7, this functionality has been extended to allow you to search for appropriate categories and create new categories on the fly, using an AJAX widget built into the main node/content editing page. This reduces the amount of effort and planning required to maintain an organic list of categories, suitable for blogging and community environments, significantly.

The menu system has received a similar upgrade. Previously, in Drupal 4.6, you could create any number of user-defined menus and place pointers to nodes in these using the menu editing system. In Drupal 4.7 menu items can be created "on the fly" (a feature previously only available through a community module) during the creation or updating of the content itself. This, again, reduces the amount of effort require to add a page to your menu structure, which was a separate task to editing content in previous versions.

All of Drupal 4.6's features to edit and version content have been retained, as have the features to control comments and authoring information (although this has been extended with a neat AJAX auto-complete function).

The user interface for Drupal 4.6 had a habit of "breaking down" a little when lots of different modules and options were enabled. With multiple menus and combo boxes added to the content editing page, it can become difficult to find your content! It was also frustrating trying to create a UI suitable for a non-technical end user, particularly as the order of controls could not always been altered.

In Drupal 4.7 the developers have implemented a simple system of grouping fields together in collapsible sections. This keeps the interface clean without dumbing it down. This system has been used to great effect on the busier admin pages, such as the main settings, and is being used in many of the new community modules.

Another neat feature is that text areas, such as the area for editing the body text of a node, can now be enlarged with a simple drag mechanism -- great for editing those very long pages! This feature does seem to "chase its own tail" a little when combined with WYSIWYG editors such as TinyMCE, however.

Drupal 4.7 also boasts improvements to its database/page caching mechanism to improve speed and to better control the use of the mechanism on busy sites. The search engine has also been upgraded. I can't vouch for how much of a real improvement these changes are, as I don't have any sites large enough to test them effectively. However, the Web site has clearly been upgraded, and I can attest to a marked increase in the speed there, despite the increase in traffic generated by the release of 4.7.

Should I upgrade?

Despite all the nifty improvements, I would counsel against upgrading a 4.6 site immediately, unless there are "killer features" in the new 4.7 that you consider to be more important than the features you are getting from your currently installed modules. In time, you can reasonably expect all of the 4.6 modules either to have been converted or to have a new 4.7 equivalent. In the meantime, upgrading could leave you with a site somewhat lacking in features.

On the other hand, if you're starting a new site and you can meet all of your requirements with Drupal 4.7 and its current set of modules, I strongly recommend that you build your site this way. For existing Drupal users building a new site, the improvements to the editing mechanism alone are compelling. For people new to Drupal, this is more than just a CMS. This is a web platform that you can extend and customise in more depth than any other I have come across. Drupal should be on your shortlist for any new build.


  • Enterprise Applications
Click Here!