DRUPAL Basics 3 (Architecture)

In the preceding section, we introduced the technologies that drive Drupal.
However, how do they all fit together? In this section, we provide an overview
of Drupal’s architecture.
Let’s begin with a visual representation. The following diagram sketches Drupal’s
main components:

The preceding figure represents, in a roughshod way, how Drupal is structured. It
also indicates how Drupal handles a request. We will talk about the components
in the remainder of this section. As a first approach, though, let’s walk through a
simplified example of a typical request as it is handled on a Drupal website:

  • A user enters the URL http://example.com/node/123 in a web browserand hits Enter
  • The browser contacts the web server atexample.com and requests theresource at /node/123
  • The web server recognizes that the request must be handled by PHP, and starts up (or contacts) a PHP environment to handle the request
  • PHP executes Drupal’sindex.php file, handing it the path /node/123
  • The Drupal core undergoes a bootstrap process, initializing resources, and then uses the menu system to find out how to handle /node/123
  • The node system responds to the request for /node/123 by loading the node (piece of content) with the ID123. This data is typically loaded from a database
  • The theme system takes the node information and applies formatting and style information to it, essentially transforming data into chunks of HTML with associated CSS
  • The Drupal core completes all processing (giving many other subsystems the opportunity to handle various bits of data processing) and then returns the data to the client
  • The client web browser transforms the HTML and CSS into a visual presentation for the user, running any necessary JavaScript along the way
  • The user views the document

While this illustration hasn’t hit every technical detail, it does provide a glimpse
into the way Drupal functions on the web. In the following section, we will spend
some time looking at the big Drupal subsystems—nodes, themes, menus, and so on.
However, in the present section, we are more concerned with the general way in
which these systems work together.
Earlier, we saw that under normal conditions, PHP loads Drupal’s
index.php file to
handle a Drupal request. This short script is responsible for starting up the Drupal
environment, and it is part of what we typically call the Drupal core.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s