As an
independent study shows, about 67 percent of Web developers on Habrahabr write their CMS. During his life, your humble servant wrote about five or six CMS bikes, and in the process of work was eagerly dug up a lot of information about the structure and principles of operation of other CMS, and also invented several of his own. The world of CMS is full of various modules, extensions, components, components, plugins. I want to tell how CMS developers allow to expand functionality, and what terms are used for this. Immediately I warn you that the following information may be confusing, therefore, terms that have different meanings in the context of different CMS carry a number in brackets indicating a particular meaning. Some of the principles outlined here can make someone wrinkle. The list mainly lists the functionality that expands the system. The syntax used in the examples is invented in most cases.
I hope the list will help with the organization of the principles of the work of their own CMS, throw the idea or just be interested. Those who are bored can try to guess which CMS was meant in each specific case (in order to avoid holivar, the names of the CMS are not used in the list itself, and in specific cases the terms may contain a slightly different meaning).
Module (1) - a block with a header - a fragment inserted into a specific place on the page, in the left block, right block, in the central part or on the main page. As a rule, all modules have a similar appearance, defined by the layout (1). The content is determined by the administrator (for example, who is online, or the last photo in the gallery).
Component (1) - one or several pages, for example, a photo gallery or an online store. Module (1) may belong to component (1). Each page belongs to only one component. The component takes for itself the central area of the marked layout (1).
Expansion (1) - functionality missing in the system kernel, adding new low-level features used by the programmer (new image cropping method, functionality for creating backups, new data type, etc.).
Tag (1) - construction of the form {block}, # BODY #, {TITLE}, which will be replaced with the result of the code or the contents of the file. As a rule, a list of allowed tags is defined, and a list of data or scripts that will be inserted instead of tags. Also sometimes play the role of areas for layout layouts (1). In some cases, it is used to insert independent fragments of code or data (for example, the title of a page or insert a code to display the code of a link exchange exchange). Often the presence of such tags is explained by the desire to separate templates from logic. It is also often for creating a new tag in a certain index.php a new element of the array is created, on which the usual str_replace () is produced.
Layout (1) - a file containing HTML markup often simply has marked areas into which modules (1) or components (1) are inserted. Unlike the template (1), it contains only the layout of the entire page. May consist of two files (header and footer).
Template (1) is a fragment of a page containing HTML code and special characters for inserting the results of code operation. For example, a directory page template contains a directory layout without the layout of the appearance of the entire page. In some systems, templates can be built on the basis of other templates.
Editable area (1) , File (1) - a place is indicated in a certain file with a layout, the contents of the files are inserted into this place, including php-files with a code. In some cases, such files are created automatically when the page is created. Often only content is stored in such files. Sometimes before and after this file, the header and footer of the site are inserted.
The editable area (2) as a rule, several areas are indicated in the layout, then the administration system determines what to bring to a particular place.
Snippet (1) , or Module (2) - a function that performs an action and returns a result. For a quick call, it is inserted into the template (for example, {% print_comments%})
Snippet (2) is a ready-made small fragment of the layout, the administrator based on it receives the HTML code for insertion into the page (for example, the Download and Demo buttons in the review blogs).
Chunk (1) , or Template (2) - a named fragment of a ready HTML code (for example, {{header}} or {{footer}})
Filter (1) is a short construction, for example, {PHOTO = Photo name}, is inserted into the text content of the page by the administrator, and will be replaced with the result of the code operation.
Filter (2) - the rule for replacing one fragment with another, including using a regular expression (for example, '/(.*)/'=>' Page Header '), is used to simplify the insertion of data into a template without flip or edit last one.
A mambot (1) is a code that changes the HTML code after it is generated.
Application (1) is a certain code that is visible in the admin panel and which is able to influence the contents of the database or, for example, conduct maintenance (backups),
Plugin (1) is a code that expands the functionality so that the system can use the new data type in addition to the existing ones, for example, a Youtube link or support for a postgree database instead of Mysql.
Plugin (2) is a mini-application that appears on any part of the site and is independent (for example, voting, twitter repost or clock)
The script (1) is a file located in the folder with the system, which can be run by some fragments of the site. It is used to quickly insert new features with low-level methods when finalizing the site by programmers who serve the site. As a rule, is an independent php-code. Can be replaced with Tag (1), or inserted in another way.
Template (3) is a folder containing a page layout, images, css-files of a template, sometimes a preview. In specialized CMS allows you to completely change the appearance of the site.
Loader (1) - a separate independent script that performs the role of an intermediary or performing minor functions (for example, captcha, Ajax loader or pop-up banner).
Class (1) - a folder with a description of the class containing the methods that display the data. Used in templates - {% search do_search%}
Hook (1) - a function called instead of some other function, or a template called instead of another template, overrides the original functionality when trying to use it.
Hook (2) ,
Trigger (1) is a function that is called immediately after some other specific function or after a request for a specific template. Can be used to write logs, or to send email.
Rule (1) is a string in the ini file or other place that defines the mask for the URL and a link to the code that processes it in some way. For example, '/ catalog / add' -> addme.php
Function (1) is the same as Class (1), only an independent function.
Fragment (1) - part of the template with HTML-layout (for example, shape or frame), can be used in several places.
Admin (1) is a full-fledged extension for CMS, providing an alternative interface for managing data. In the case of CMF, an interface for managing data that may not be present at all in the original CMF code. In the case of a CMS, an alternative backend for managing the system.
Component (2) ,
Module (3) is a code that has a template that is visually inserted (as an icon or image) into a page when editing in a WYSIWYG editor. It can be a list of articles, an article, a form for sending a message, a gallery and so on.
Database (1) - additional data in the form of a CSV file, or in another form, expanding the data used (lists of cities, currency rates, address databases, courier services, etc.)
Loader (1) ,
Extension (2) - a function or a file with a code that is executed before the page is processed, performs routine actions (writing to the log), overrides the URL, or declares a function.
Skin (1) is a folder with images that changes the appearance of the administration system.
Skin (2) - a template for the site that changes the appearance only visually (colors, background), but not able to swap certain blocks, or change functionality. Unlike the template, it does not contain data on the location of the blocks on each page, unlike the layout, it does not contain HTML layout.
Extension (3) - some javascript or php files developed by third parties who do not completely change the appearance or functionality of the site, but can be used by developers (for example, jQuery library and plugins, classes for sending emails, and so on). As a rule, they are located in a folder called external or similar, unlike the internal folder, which contains extensions (4) (modules, components) created by CMS developers and being part of the system.
Extension (4) - module, component, plugin - as a collective term.
The framework (1) is a kind of flexible CMS-based solution that has its own management system or its own API, which allows the flexibility to add functionality. May have its own extensions (4). For example, there is a framework for flexible management of the template, the menu of the site, appearance and Javascript-beautiful.
Plugin (3) - addition to TinyMCE (WYSIWYG - editor), which adds a new button.
API (1) is an additional functionality that allows the use of site data by external sites or applications.
API (2) - classes or functions that simplify (complicate) the life of the developer (for example, an additional, alternative API for working with a database).
Module (4) ,
Patch (1) - data for modification of the original system code. Contains line numbers to be modified, as well as files to add in addition to the rest. Often there are modules (4) that allow you to connect the remaining modules (4) in manual mode using the interface. Theoretically, they can transform the functionality of the system beyond recognition.
Tool (1) is a script used by the administrator (for example, to change the rights to write to a folder or output phpinfo () data.
Manager (1) - an independent script block for additional management, for example, a file manager, an image manager, a database manager. Sometimes it can work without the main system and is developed by third parties.
Wrapper (1) is an extension (4) that allows you to embed the site inside another cms (for example, a forum inside a wiki or a wiki inside a blog).
Module (5) - extension (4) for the system, adding a completely new functionality, not touching the existing one. For example, adding forum functionality to a wiki engine, blogging to a forum, online store functionality to a business card site, and so on. Often sold separately.