官术网_书友最值得收藏!

Developers' Tools

So far, we've looked at some of the preliminary concepts involved in Drupal development. To finish off this chapter, we will switch focus to development tools.

There are a few Drupal-specific tools that you might find helpful when creating your own modules. These tools are themselves provided by two modules, which can both can be obtained from the Drupal site.

Developer Module

The Devel Module provides several tools that are extremely useful for Drupal development, including cache management, SQL debugging tools, investigation tools, a module reinstaller, an API reference tool, and many more.

You can find out more about this module at the official website: http://drupal.org/project/devel.

The main part of this module (the Devel module) provides these tools as items in a block. So after installing the module, you will need to go to Administer | Site building | Modules and enable the module, and then go to Administer | Site building | Blocks to tell Drupal where to display the new content.

This module also includes tools for building themes, a macro generator to simulate form data entry, and a tool to generate testing data. As the module continues to improve, new features will be added as well.

Any serious module developer will want to install the Devel module. In the writing of this book, it has proven an invaluable tool for reinstalling modules, clearing caches, and debugging difficult code.

Coder Module

As we shall see in this book, Drupal developers adhere to strict conventions in their code. The Coder Module is a tool designed to help you, the developer, locate and fix code that does not adhere to these conventions.

In addition to making sure code follows conventions, it also does some basic security auditing regarding how text is handled. This can be useful for spotting mistakes before they become security risks.

The Coder Module is also hosted on the official Drupal site: http://drupal.org/project/coder.

While it does not improve productivity in the same way that the Devel module does, Coder can help you generate clean and "Drupalish" code. Its strict syntax checking also occasionally turns up bugs.

Note

"Drupalish"

Drupal developers are fond of using the word Drupalish to refer to practices, styles, and approaches that mesh well with the Drupal philosophy. For example, Drupalish code adheres to coding guidelines and makes use of data structures common in Drupal (like nested associative arrays).

In addition to these modules, there is a wealth of information on the Drupal website about how to configure your favorite development environment (including Emacs, VI, FireBug, and Eclipse PDT) for Drupal development: http://drupal.org/node/147789.

主站蜘蛛池模板: 湟源县| 历史| 长子县| 桐庐县| 宜兰县| 盐边县| 嵩明县| 莲花县| 合作市| 文山县| 余江县| 阿合奇县| 桐梓县| 政和县| 永年县| 如皋市| 荣成市| 若尔盖县| 固原市| 镇沅| 泗阳县| 隆回县| 墨竹工卡县| 台安县| 丰镇市| 道真| 南和县| 栖霞市| 从化市| 麻城市| 东平县| 高唐县| 常山县| 苗栗市| 西峡县| 滨海县| 永康市| 大埔区| 英山县| 和政县| 宝应县|