help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

AxCategory Introduction

 

Categorization is fundamental feature of AxCMS.net content management system. That applies both to custom development projects built on top of AxCMS.net as well as to the AxCMS.net system itself.

Category is single structural element with a list of properties. Many elements together make a hierarchical structure called category tree. Category tree have always root element and elements that are brought under this root are its children. Depth of the category tree is not limited by AxCMS.net and you are free to create any structures you want.

Categories participate in AxCMS.net system in the following ways:

Structure – Every web site inside the AxCMS.net system should have some navigation structure (at least one navigation node, but usually much more).  These navigation structures participate in building up logical structure of web sites by very often playing the role of linking to a page or document and displaying itself in navigation components.

Not all the objects classified under a category node must be represented in the form of web resource navigation. Sometimes it is needed to classify objects in order to define structure for content. There is a special category tree for such kinds of classifications available for AxCMS.net editors.

Categorization – In order to manage data, one should create logical structures out of it. These kinds of structures are very likely hierarchical – just like the category trees in AxCMS.net, which provide users with functionality of classifying the content of the system in the way needed to present of store it.

Categories as objects – There are several elements in AxCMS.net, which act like objects completely separate from categories, but are technically implemented as category nodes. Those objects are the following (the behavior of these objects is out of scope of the current article):

  • Rights - Objects granting an access/modify rights to a user for predefined areas (category trees). By that way, a user can access/modify only resources classified under the category sub trees she has the right defined.
    Both the areas as well as rights are technically an implementation of categories.
    Please read here for more information about the AxCMS.net security: http://en.help.axcms.net/en_help_cms_dev_str_sec.AxCMS
  • Roles - Objects doing pretty much the same as the rights, except that the roles are global – they do not restrict users with areas.
  • Checkpoints - “Security guards” for “letting through” only those users who have permission for a requested object (usually, but not limited to, pages and documents).
  • Relations - It is sometimes necessary to group two or more objects with each other without actually categorizing them. For example: a news portal editor might need to bind a set articles, which describe the same event or issue, with each other; some systems, on the other hand, require definition of relations like “marriage” in order to specify two (or more – depends on the culture) people who have found each other. The concept of relations is especially prepared for these kinds of situations.

Categories bound with objects – there is a special set of categories, which are not acting alone, but in cooperation (1-to-1 relationship with another objects). These categories are the root nodes of the websites (more info about AxSite concept can be found here http://en.help.axcms.net/en_help_dev_sites_axsite.AxCMS).
Please see here for more information about the Security Concept in AxCMs.net:
http://en.help.axcms.net/en_help_cms_dev_str_sec.AxCMS

Categories in the AxCMS.net system have the following characteristics:

They are Publishable  – as a standard procedure, the categories are created in the Management System (MS) context and then published to the Live System (LS) by that way cloning a category tree to the Live System. Every change in a category instance must be done inside the Management System at first and then published to the Live System. When changing categories directly in the Live System, there will be a risk of data loss when re-publishing a category tree.

They are Cached – While Categories play very important role in the day-to-day work of an AxCMS.net system, there are some special considerations needed for making sure the category trees will not become an annoying performance bottleneck of the system.

AxCMS.net system makes use of the ASP.NET caching for storing category trees in memory and avoiding database requests every time tree is accessed. Category trees are requested only once and then kept inside ASP.NET memory cache (until the tree is something changed).

Every time a new category is created or an existing one is modified, the whole category tree is regenerated inside the database by the help of stored procedures. The main task for those stored procedures is to update the category- tables (AxCategory, AxCategoryTree) according to the made changes. This will improve the performance and simplify the structure of SQL queries for requesting categories.

Conception of publishing also helps to improve the performance in category-related operations. Category tree is created in the Management System and published to the Live System. When the Management System and Live System are situated in different servers, it has certain level of performance effect – a category tree is regenerated in an ASP.NET cache only when it has changed. Not every change in the Management System category tree is worth regenerating the category tree in the Live System.

They are Extendable (since version 9.0) – Although category instances have properties, which will satisfy the needs of a project in most cases, it is sometimes necessary to extend the category objects with custom properties. The AxCMS.net system is designed by keeping that potential concern in mind. Extending of categories will be described later in this article.