Start page

Mykola Zharkikh (Kyiv)

Personal site



What is the Smereka

Smereka tree is actually the same as the spruce, the local name of Carpathian spruce.

Smereka trees in the Carpathians

In addition, Smereka is the original Ukrainian program for generating web sites and managing their content, which implements a hierarchical model of data for the editor, and net model – for site reader site: (System of Managing web Resources by Network Klient Access – SMEREKA).

Smereka written in PHP and uses a MySQL database. In ideological terms it is close to another my design – hierarchical database "Myslene Drevo".

Key concepts

Tree – unidirectional oriented graph. All information in Smereka stored in a tree with one root node.

Tree consists of nodes – the elementary units of information. Each nodes is addressed (via URL) data element that may be one web page. But Smereka allow to compose a web page with several nodes.

The node has a set of attributes – elements of information. The node contain heterogeneous information and may combine different data types. Attribute contains only data of one certain type, for example, integer or string. Attributes appear as blocks hierarchically subordinate to the node, but they are not addressed via URL's and can not form their own web pages.

Id – the primary attribute of the node, unique in the context of database numeric node identifier. It is an unsigned 4-bytes integer (ie, Smereka space consists of 4 billion nodes). Id's are the core functionality of Smereka, but by themselves they do not represent any interests for neither the editor nor the reader.

Class – another attribute. It is an unsigned 4-bytes integer and defines the functionality of the nodes. By value of class Smereka determine which attributes should have the node. Please be aware that in addition to regular attributes defined by class, node may have other attributes (private). The usage of attributes (both regular and private) depends on the context of calculations. «Subdomain» or «User» are both an examples of classes.

Template – node attribute, which determines how the node will be represented for the editor and for the user. The class defines information contained in the node and template – a layout for information in a web page.

Symbolic name – string type attribute. It is used to form the symbolic address (URL) of pages.

Context – a notion which reflects the circumstances of the node functioning. Context is not an attribute. Major components of the context of Smereka are Smereka global configuration settings, http request parameters and the hierarchical position of the node (of course, is more global setting used by PHP itself, MySQL, web server and operating system). Context defines the rules of calculation of some value (the context of calculation). For example, visibility of node for user is calculated based on the attributes of node itself, its hierarchical position and user rights (the latter two groups are the context of the calculation).

Sibling nodes – a group of nodes with the same hierarchical position, ie, that have the same node as parent.

Smeretag (Smereka tag) – lookup field, an expression that is calculated during the compilation of a web page before sending it to the user.

Smeref (Smereka reference) – internal link to another node within the same Smereka tree. It is most oftenly used smeretag.

Read next