A general way to describe Drupal's architecture would be to divide it into four major parts, as is the case in the following diagram:
To understand the architecture, let's first learn about the components of Drupal. Drupal's components are listed here:
-
Themes: Themes are collections of files that define the user interface of a Drupal website. The files contain code written in PHP, HTML, and JavaScript.
-
Modules: Modules are event-driven code files that can be used to extend Drupal's functionality. Some modules are known core modules that are maintained by the Drupal development team as they are an essential part of Drupal's operation.
-
Core APIs: At Drupal's core are the APIs that are used to communicate with content and other modules. These APIs include the following:
-
Database API: This allows a developer to easily update/modify data in the database.
-
Caching API: This API stores page responses so that the browser doesn't have to render pages every time a request is made.
-
Session Handling API: This keeps track of different users and their activity on the website.
-
- Database: This is where all the data is stored. Drupal supports different types of databases, such as MySQL, Postgres, and SQLite.
Now that we have a basic understanding of Drupal's architecture, let's look at the directory structure next.