Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
14Activity
0 of .
Results for:
No results containing your search query
P. 1
How Drupal Works

How Drupal Works

Ratings: (0)|Views: 752|Likes:
Published by api-17189252

More info:

Published by: api-17189252 on Oct 02, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/21/2012

pdf

text

original

 
How Drupal Works
I
nthischapter, I’ll give you an overview of Drupal. Details on how each part of the system works will be provided in later chapters. Here, we’ll cover the technology stack on whichDrupal runs, the layout of the files that make up Drupal, and the various conceptual termsthat Drupal uses,such as nodes,hooks,blocks, and themes.
What Is Drupal?
Drupal is used tobuild web sites. It’s a highly modular, open source web content manage-ment 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 byenabling built-in or third-party modules.Drupal isdesigned to be customized, but customization is done byoverriding the core or by adding modules,not by modifying the code in the core. Drupal’s design also successfully separatescontent 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;an intranet, to mention only a few possibilities.Itcan even be used to teach a distance-learning course. Adedicated security team strives to keep Drupal secure by responding to threats andissuing security updates. A nonprofit organization called the Drupal Association supportsDrupal by improving the
drupal.org
 web site infrastructure and organizing Drupal confer-ences and events. And a thriving online community of users, site administrators, designers,and web developers work hard to continually improve the software; see
and
.
Technology Stack 
Drupal’s designgoals 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.
1
CHAPTER 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 muchabout 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(includingMicrosoft IIS) may be used. Because of Drupal’s long history with Apache, Drupalships with
.htaccess
files that securethe Drupal installation.
Clean URLs 
—that is,thosedevoidof 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 neednot change, and unchanging URIs are cool, according to Tim Berners-Lee (
). Clean URLs are available on other web servers byusing the webserver’s URL rewriting capabilities.Drupal interfaces with the next layer of the stack (the database) through a lightweightdatabase abstraction layer. This layer handles sanitation of SQL queries and makes it possi-ble to use different vendors’ databases without refactoring your code. The most widely tested databases are MySQL and PostgreSQL, though support for Microsoft SQL Server andOracle is increasing.Drupal is written in PHP. Since PHP is an easy language to learn, there are many PHPprograms written by beginners. The quality of beginner’s code has given PHP a bad reputa-tion. However, PHP can also be used to write solid code. All core Drupal code adheres tostrict coding standards (
)and undergoes thorough review through the open source process. For Drupal, the easy learning curve of PHP means thatthere is a low barrier to entry for contributors who are just starting out, and the review process ensures this ease of access comes without sacrificing quality in the end product. And the feedback beginners receive fromthe community helps to improve their skills.
Core
 Alightweight frameworkmakesup the Drupal
core 
.This is what you get when you downloadDrupal from
drupal.org
.The coreis responsible for providing the basic functionality that willbe used to support other parts of the system.
CHAPTER 1
s
HOW DRUPAL WORKS
2
 
The core includes code that allows the Drupal system to bootstrap when it receives arequest, a library of common functions frequently used with Drupal, and modules thatprovide basic functionality like user management, taxonomy, and templating as shown inFigure 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 visual theme. The first user, user 1, is the superuser with completeaccess to the site.After logging in as user 1, you’ll see an Administer link within your userblock (see the “Blocks” section). Click that, and you’re inside the Drupal administrative inter-face. Each user’s block will contain different links depending on his or her access levels forthe site.
Modules
Drupal is a trulymodular framework. Functionality is included in
modules 
,which can beenabled or disabled (some required modules cannot be disabled). Features are added to aDrupal web site by enabling existing modules, installing modules written by members of theDrupal community, or writing new modules. In this way, web sites that do not need certainfeatures can run lean and mean, while those that need more can add as much functionality asdesired. This is shown in Figure 1-3.
CHAPTER 1
s
HOW DRUPAL WORKS
3

Activity (14)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Teguh Nugraha liked this
StatenScrib liked this
TulipX liked this
siyerindu liked this
Abhijit Mane liked this
Maniraj Murali liked this
Maniraj Murali liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->