Writing modules

Creating modules in Drupal

CMS Drupal is meant for comfortable site content management. With its help it is possible to public, manage and organize site content. Functional abilities of Drupal allow to create blogs, forums, file loading systems, picture galleries and many others.

CMS Drupal has handy instruments to create websites for specific purposes.

Drupal is the best choice if the project is planned to develop in different directions.

Drupal is a comfortable module structure, consisting of the core and modules of developers. It is always possible to shut off unwanted modules, it will essentially make the work easier. There is a possibility to create and connect modules allowing to essentially widen the functionality. In contrast to other CMS, Drupal has simple module use idea.

Drupal modules

Module files are situated in the same name catalog. The module name is written with English alphabetic symbols without special signs and spaces. In modules catalog there are catalogs with system modules. If modules are custom or downloaded from drupal.org, it is better to place them in catalog sites/all/modules. In module catalog there are php scripts files, CSS styles files, module themes. Others.

Minimal files set:

  • name_of_module.info – file including information about module (its name, description, version Drupal etc.);
  • name_of_module.module – file including code providing module functionality

In case of necessity of any preparations before the first module start (for example, in data base tables are creating during module installation) or to do system cleaning after the last start during module uninstall, the module with the name name_of_module.install is used.

Creating and setting modules.

For creating module for CMS Drupal:

Enter catalog sites/all and find catalog modules or create it in case in this Drupal modules are not set yet. In the catalog modules create catalog name_of_module, create two files there: name_ofmodule.info and name_of_module.module.

Write the required information in files.

Info file

In info file there is information about module. This file format is the same as the format of configuration file php – php.ini, small size (no more than 10 lines).

Programming language, that we use for the website development is Python.

Python is a high-level programming language, that is characterized by orientation on high performance of the programmers and easy read code. Python combines many programming styles: object-oriented, aspect-oriented, functional and others. Python supports multithreaded calculations and high level data structures. Standard python library is multifunctional and contains many useful functions. Python is a programming language that doesn't require compilation, it's apps can be executed in the interpreter, right after they were written or during. This makes python an easy learned and highly functional programming language. Python works without any problems on most popular paltforms.

The source code on python is readable, it's syntax is well defined, well thought and not overloaded. 

Python is a dynamically developing programming language. Python developers are gathered in a friendly community and stick to their programming philosophy программирования, and all new documentation is strictly regulated.

Worldwide known companys such as Google App Engine, Yandex, DreamWorks, Mail.Ru and even NASA use python! 

For the website development we use python and Django framework as a development environment. We choose stable and high performance of our - and yours, websites.