The Origin and advantages of Drupal

Source: Internet
Author: User
Tags drupal

1. Drupal origin:

What Should Drupal be translated? I think it is better to translate it into water drops.
Drupal is actually the English pronunciation of druppel in Dutch, and druppel is drop in Dutch, which is the meaning of water drops. It was an accident that Drupal's author initially chose this term. He originally wanted to register a domain name named "Dorp", which means "small village" in Dutch, in fact, this term also exists in English, but he accidentally made a mistake, so he registered it as drop, and then there was Drupal. Well, it sounds good to translate Chinese into "water drops.


2. What is Drupal?

Some people regard Drupal as a blog system. I thought it was the same in the first place. In fact, this is only an application of Drupal. Drupal is a powerful Content Manage System (CMS ), in terms of function design, it is modeled on phpnuke, xoops, and other modular methods, and the interface is modeled on the blog mode. This program implements very powerful functions with very little code. Many people use the word "magic" to describe it. It is a fully open-source program, which attracts the eyes of many PHP enthusiasts, many PHP experts have been involved in its development. The development speed is very low. A new version is available in almost two months, and more modules and skins are available. It can be seen from the official site that sometimes thousands of people are online.

3. Drupal has the following advantages:
001 -- search engine-friendly URL

002 -- Drupal has an excellent modular structure and provides many modules, including short messages, personalized bookmarks, website management, blogs, diaries, e-commerce, e-publishing, message books, jobs, online cinemas, forums, and voting modules. It is very convenient to download, install, and customize the Drupal module.

003 -- Drupal provides a powerful personalized environment. Each user can customize the website content and presentation.

004 -- Drupal provides a role-based permission system. You do not need to authorize each user. You only need to authorize the role.

005 -- the intra-site search system provided by Drupal can index and search all content in the site

006 -- Drupal's template system separates content and performance to easily control the appearance of the website + Drupal provides built-in news aggregation tools + provides comprehensive site management and analysis tools
007 -- Drupal's caching mechanism can effectively reduce the number of database queries, thus improving site performance and reducing server load

1. modular system ).

Drupal abstracts each part with independent functions as a module, and each module (except the core module) can implement the interface (http: // according to the Unified Specifications cleverly designed in advance /) ------ In Drupal, these interfaces are PHP code files named according to specific rules, PHP functions named according to specific rules in specific PHP code files, and specific PHP functions executed according to specific parameters. functional PHP code block ------- it can implement the module's own functions and automatically interact and communicate between modules under the scheduling of core code, this makes the function expansion of the entire system more flexible and standardized. The functions of each module are relatively independent. changes within a single module generally do not affect the original functions of other modules. Problems of a single module generally do not cause unavailability of the entire system, in this way, the cost of system development and maintenance can be greatly reduced.
Drupal modular installation and use is also very convenient, as long as you copy the corresponding file to the modules directory, you can easily enable it in the 'management-setting.

2. Hooks System)

The hook mechanism is actually a key part of Drupal's modular system. The Drupal modular system is based on the concept of a "Hook". A hook is a PHP function named in the foo_BAR () method. Foo is the module name and bar is the hook name. Each hook defines a series of parameters and return types for specific functions. For example, the hook myblog_load ($ node) is executed when the system loads the node information corresponding to the module myblog, and attaches the node specific information corresponding to the module to the node. Hooks allow modules to interact with each other under the scheduling of the Drupal core, including interacting with the core itself. Drupal's module mechanism greatly simplifies the development and maintenance efficiency of implementing the specific functions of the module, because you only need to implement specific hook functions to obtain the corresponding functions, there is no need to worry about how these functions are called and how they interact with the system.

3. content type for nodes

This term is borrowed from the object-oriented concept in programming languages. In programming languages, object-oriented programming is based on the basic object when writing an application, the entire complex application architecture is established through encapsulation, inheritance, abstraction, polymorphism, and overloading. Object-Oriented programming effectively reduces the abstraction and complexity of program development by abstracting the objective world into an object combination and interacting with each other.
Drupal regards all content types as nodes, and various content types are extended based on basic nodes. For example, if your Drupal site has a content type called supply (supply), the content type automatically has the attributes and methods of the basic content type (node, then you can add a few additional attributes and methods to implement supply. This is in line with the object-oriented concept, so I call it Drupal's content type node-oriented feature.
The advantage of using all content types as nodes is that they can be based on the same underlying data structure. For developers, this means that you can perform many operations on all the content in the same code method. You can easily perform a group of operations on a node, and you can also add many additional features for your node type. Because all content is a node, you can easily use Drupal's built-in support for content search, creation, editing, and management operations. This content consistency is equally evident for the client user experience. Because the forms for creating, editing, and deleting nodes have a similar appearance, the user experience is consistent.
However, all content types are based on node. I think there are also some disadvantages, that is, when the Drupal core executes the corresponding node hook function, it will try to execute the hook function corresponding to all node types, in this way, the system performance will decrease as the content type increases.

4. Form API)
Drupal provides an application interface (API) to generate, verify, and process HTML forms. The form generation, verification, and processing functions are named according to the agreed naming rules. For example, the content type myblog form generation function is myblog_form (& $ node, & $ PARAM) by default ), the corresponding form verification function is myblog_form_validate ($ form_id, $ form_values), and the form processing function is myblog_form_submit ($ form_id, $ form_values ). The Drupal core will execute corresponding functions to generate, verify, and process forms according to naming rules as appropriate.
In addition, the form API abstracts a form into a nested array of attributes and values. When a page is generated, the form rendering engine presents the array as appropriate.
The function of form API can not only greatly simplify the most common form generation, verification, and processing work in site development, but also greatly improve the adaptability to form changes.

5. Theme system)
Drupal supports configuring different themes for the site. A topic is composed of a group of files that display the appearance of your site ------ mainly template files. The template file is named according to the specified naming rules. For example, node. TPL. PHP file for the default node content display template file, and the node-supply.tpl.php for the content of the node content supply template file; also such as page. TPL. PHP shows the template file for the default page content, while the page-supply.tpl.php shows the template file for the page content of the module supply. You can even customize your own template file in template. php to implement a specific content display template (refer to ).
The advantage of the template mechanism is that you can completely separate site data processing from data display, so that you can free up developers' energy from tedious content display formats, focus on implementing the business logic functions of the site. Second, the template mechanism also makes it easy for us to improve the appearance of the site without the need to adjust the existing program.

6. Menu System)
Drupal uses the menu hook hook_menu to implement its menu mechanism. As long as the menu is defined in the hook_menu hook function in the module according to the agreed rules, the Drupal core will implement the corresponding menu in the site interface (see the for details ). Through the menu mechanism, developers can easily design and adjust the menu system of the site, which greatly frees developers from their work.
6. Ajax support
Drupal's built-in support for jquery and JSON. The perfect combination of jquery and JSON makes Drupal a lightweight and efficient Ajax implementation, greatly improving the efficiency of compiling Ajax applications.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.