Submitted articles

Drupal

Author: Adam Evans
Company: CTI Support Network
e: a.evans@ctisn.com
twitter: @ajevans85
blog: http://www.ctisn.com/blogs/adam-evans

What is Drupal? Drupal is a open source Content ManagementSystem (CMS) built using PHP. Recently it has had a lot of press and is starting to become the dominant Open source CMS of choice for many companies of all sizes. It is suitable for building small 5 page websites, larger website such as online communities, SMBs, intranets and news based sites etc. Drupal is seeing increased usage in the public sector with large interests from education professionals who are keen to be seen using open source and also provide the next generation of online learning tools.

There are many CMS products available, some open source, some proprietary, some aimed at managing small sites and others aimed at enterprise level document management and intranets.

So what makes Drupal stand out and why is Drupal seeing an increase in use and popularity?

Drupal at it’s minimum is a framework providing a ‘Front Controller’ to handle requests, a database API for working with different database vendors, a theme layer for abstracting the view, a security layer for access control and a hook system to provide endpoints for modules to extend the Core CMS functionality. The clear separation of concerns, the ability to be deployed on a standard Linux Apache MySQL and PHP environment and the moduler design of Drupal are what set it apart from other CMS products out there. Drupal is very much a developers CMS but you need to think in a Drupal way to work with it.

Key features of Drupal:

  • Extensible
  • Multilingual support
  • Multi-site support – can run multiple instances off the same code base
  • Install profiles – can create pre-configured sites/products (Open atrium http://openatrium.com/)
  • Large number of contributed modules / themes
  • Extremely active community, growing daily

It is largely agreed that there is a large learning curve for Drupal compared to other alternatives. While to take full advantage of Drupal you do need to be a competent programmer who is familiar with PHP this doesn’t mean you cannot use Drupal with no previous development experience.

Drupal has an enormous number of contributed modules[1]. Using these contributed modules, it is possible to build feature rich websites with little to no coding at all. Using the contributed modules, you can follow many common recipes to create features using modules to provide and glue them together. Some modules, as well as providing functionality to an end user, provide additional API’s to developers in order to further extend the core functionality of Drupal.

An indication of modules which almost every Drupal installation will make use of can be seen by sorting the modules by popularity on the downloads page[2]. For 90% of the work I have carried out in Drupal, I have almost certainly made extensive use of:

  • Views (allows you to create views of content by content type, taxonomy....)
  • CCK (allows you to add fields to content types in a simple manner)
  • ImageCache (allows for on the fly image manipulation, scaling and generates static images). It’s quasi-impossible to think of building a Drupal site without the 3 above modules these days.Views and CCK provide their own API and are therefore also key dependencies for other modules. The API for views allows to provide a layer of abstraction on the database layer for displaying content and providing a nice user interface for building content displays, you can also provide additional filter arguments, view representations such as XML, RSS and so on.

The API for CCK allows you to create complex form elements from a simple textfield to input field to geocache a address and show a Google map. These form elements can then be added to any content type, multiple times, allowing the creation of complex node types / documents which can be processed and displayed to the user as you like.

Using these re-useable components with the theme layer, you can place them on your site and not have to change any code in the module to style them as theme-ing happens outside of the module. This is another plus, in that both themes and modules are re-useable and separated out from one an another.

The modular functionality of Drupal is a huge advantage, however, it is wise to spend some time to consider the modules you are installing and how they work together. This is specifically the case with new users who like to try many features all at once or Social networking portals which are feature rich. With each additional module installed, there are also memory overheads to be considered, especially on shared hosting providers as on each page view Drupal goes through a bootstrap which loads all enabled modules into memory. In the current version of Drupal, version 6, functionality was added to include files which can be loaded on demand. So the main core module could implement the minimal functionality to keep the memory footprint down. If you are considering running a Drupal site with many concurrent users it is important to be aware that Drupal does have a large memory footprint. The PressFlow[3] derivative of Drupal is well worth looking into for larger sites as this has had patches applied to allow mysql / php 5 optimisation as well as database replication and reverse proxy support.

Drupal also provides further optimisations by providing several caching strategies. This helps to reduce the resources needed by Drupal and it is recommended to enable the normal caching strategy on any production site. There is a drawback to Drupals current caching implementation in that it only serves cached content to anonymous users. If Drupal is to be used as an Intranet or Facebook style application where all users must be logged in you need to take careful consideration of user load and the hosting architecture.

Drupal in the wild

Drupal is becoming increasingly popular for many large companies as a content management system of choice. Sony BMG use Drupal on many of their artist’s websites, such as Michael Jackson’s, with the multilingual functionality being a key feature.

The Economist have been using Drupal for quite sometime now on running their portfolio of sites. They also have implemented an extensive development lifecycle including the use of Continuous Integration for deploying Drupal sites.

The latest large scale Drupal site which has been said to be a great Open source move, is the launch of whitehouse.gov. The launch of whitehouse.gov is quite a huge win for Drupal as it shows Drupal can power a large scalable website securely. Whitehouse.gov also demonstrates that Drupal is leading the way forward compared to other CMSs with its plugable support for the SOLR search server built on Lucene and also providing RDF content.

Open atrium – is a project management system which demonstrates using Drupal’s moduler functionality to it’s full and making use of install profiles to create a installable product.

Drupal and the future

Drupal is currently working towards the release of its next major version, Drupal 7. Drupal 7 has had a lot of investment in the usability aspect of the CMS, with large involvement from the design and usability community. This alone will be a key factor in Drupal gaining further dominance as a CMS as it attempts to directly answer the criticisms of Drupal being hard to use for a new user. For those who would like to try Drupal 6 (or those already using Drupal 6), I would recommend downloading the rootcandy admin theme [4], [5]These alone will make it far easier working with the CMS as an admin/developer even if an end user will not be logging in to the system.

Drupal 7 has also tried to further improve its design and performance of the API. Views and CCK are now core functionalities within Drupal 7 with the new fields API. The move to PHP5 has also allowed for features such as file stream wrappers which will allow deploying static content to Content Delivery Networks near enough transparent. This and other performance improvements will allow Drupal sites to scale to handle high load websites without having to apply patches.

References

[1] http://drupal.org/projects
[2] http://drupal.org/project/modules?solrsort=sis_project_release_usage%20desc
[3] http://fourkitchens.com/pressflow-makes-drupal-scale
[4] http://drupal.org/project/rootcandy
[5] http://drupal.org/project/nodeformcols and http://drupal.org/project/admin_menu modules

 

Sponsors

This web site, with its corresponding services, are provided because of the support of our sponsors who help in a number of vital ways. All the sponsors believe in the Open Source ethos and willingly offer their support. Please recognise this support by considering them when you require services in their field of expertise. Finally without the commitment from the community this would not be possible, so thank you to you all.

Founders

Cake Solutions

Skills Matter - Open Source and Agile Training & Events

Hays - Recruiting experts worldwide