Channels ▼
RSS

Open Source

What Is Drupal?


Drupal is used to build Web sites. It's a highly modular, open source Web content management framework with an emphasis on collaboration. It is extensible, standards-compliant, and strives for clean code and a small footprint. Drupal ships with basic core functionality, and additional functionality is gained by the installation of modules. Drupal is designed to be customized, but customization is done by overriding the core or by adding modules, not by modifying the code in the core. It also successfully separates content management from content presentation.

Drupal can be used to build an Internet portal; a personal, departmental, or corporate Web site; an e-commerce site; a resource directory; an online newspaper; an image gallery; and an intranet, to mention only a few. It can even be used to teach a distance-learning course. A dedicated security team strives to keep Drupal secure by responding to threats and issuing security updates. And a thriving online community of users, site administrators, designers, and Web developers work hard to continually improve the software.

Technology Stack

Drupal's design goals include both being able to run well on inexpensive Web hosting accounts and being able to scale up to massive distributed sites. The former goal means using the most popular technology, and the latter means careful, tight coding. Drupal's technology stack is illustrated in Figure 1-1.


Figure 1-1: Drupal's technology stack.

The operating system is at such a low level in the stack that Drupal does not care much about it. Drupal runs successfully on any operating system that supports PHP.

The Web server most widely used with Drupal is Apache, though other Web servers (including Microsoft IIS) may be used. Because of Drupal's long history with Apache, Drupal ships with .htaccess files in its root that secure the Drupal installation (if you're using a Web server other than Apache, be sure to convert the .HTaccess rules to the syntax understood by your system). Clean URLs -- that is, those devoid of question marks, ampersands, or other strange characters_ are achieved using Apache's mod_rewrite component. This is particularly important because when migrating from another content management system or from static files, the URLs of the content need not change, and unchanging URIs are cool, according to Tim Berners-Lee.

Drupal interfaces with the next layer of the stack (the database) through a lightweight database abstraction layer. This layer handles sanitation of SQL queries and makes it possible to use different vendors' databases without refactoring your code. The most widely tested databases are MySQL and PostgreSQL.

Drupal is written in PHP. PHP has gotten a bad reputation, because it is easy to learn so much PHP code is written by beginners. Like many programming languages, PHP is often abused or used to quickly hack systems together. However, PHP can also be used to write solid code. All core Drupal code adheres to strict coding standards.

Core

A lightweight framework makes up the Drupal core. This is what you get when you download Drupal. The core is responsible for providing the basic functionality that will be used to support other parts of the system.

The core includes code that allows the Drupal system to bootstrap when it receives a request, a library of common functions frequently used with Drupal, and modules that provide basic functionality like user management, taxonomy, and templating, as shown in Figure 1-2.


Figure 1-2: An overview of the Drupal core (Not all core functionality is shown.)

Administrative Interface

The administrative interface in Drupal is tightly integrated with the rest of the site and, by default, uses the same theme. The first user, user 1, is the superuser with complete access to the site. After logging in as user 1, you'll see an Administer link within your user block. Click that, and you're inside the Drupal administrative interface. Each user's block will contain different links depending on their access levels for the site.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video