Manuel Schnitger: First steps - Naming conventions
written by Manuel Schnitger, 8. March 2011
There are probably a lot of concepts how to build projects with the Open Text Management Server and there are lots of different requirements which can be met by using totally different approaches but I’d like to write down some ideas regarding naming conventions that have been helpful in the past.
If you start creating your project then you will probably/hopefully think about names for folders, content classes and elements. The following questions can help to figure out if your ideas will work:
- Does the naming concept meet the requirements of the project in terms of the daily editorial work?
- How will the concept change/impact the work of the editors?
- Does the concept work even when there is a need for more folders/content classes/elements?
Hint: From time to time I saw content classes (authorization packages, publication packages,…) which all had the same prefix. At a first glance this might look professional ….but normally it’s not ;) What would I like to achieve with a prefix? Normally I use prefixes in order to differentiate things at first view. This obviously does not work, when all things (e.g.: content classes within a folder) have the same prefixes such as “mod_” or “con_”. There are possibly specific situations where this approach is meaningful and cannot be reached with other ideas but in the past I saw that other concepts worked better.
Naming concept for elements
Most people use prefixes for elements in order to identify the type of the element at first glance.
Sample: txtArticleTeaser is a text element. Of course you can also put an underscore between the prefix and the name of the element (txt_ArticleTeaser) or even write the name in small letters txtarticleteaser I prefer the Hungarian notation . So the prefix is written in small letters and if a name consists of more than one word (txtArticleText) I use capital letters for each part of the word in order to enhance the readability.
Below you find the list of prefixes that I use in the Best Practice Project.
|Content Element Media Management
|Content Element Content Server
|Delivery Server Contraint
|Delivery Server Element
Hint: It’s not necessary to use exactly the naming convention that I use ;) Just make sure that the convention is used consequently and that all people who are involved (also/especially the editors and authors) do have the same understanding of the convention(s).
Naming concept for content classes and content class folders
On the screenshot below you see one option to structure the content classes of your project. Let me just point out some advantages of this number based concept.
- When you develop your project and have to discuss things with other colleagues then you just tell them the number of the content class and they immediately know in which folder they will find the content class (e.g.: the content class “0030 – Infobox” is very likely to exist in the folder “0001 – 0200 Content Types” ;) because the number 30 is between 1 and 200)
- As the Management Server sorts the content class folder descending in terms of their names the numbers allows us to manipulate the sort order (of the folders as well as the content classes within a folder) in a way that the most often used content classes are at the top of the list. So when a user wants to create a page then the folder that is most likely being used is already opened….and the most used content class is at the top. (If there is just one content class preassigned or just content classes of the same folder than – of course- this concept has no real impact.)
- In order to support editors and authors during their daily business there are lots of things that can be done. Some people use the template preview images to choose the content class, some use the name of the content class others even read the description ;) and with this number based concept it’s even possible just to remember the number of the content class. (Well, in this container I always use the content class 15 or 25).
- Normally just every 4th number is used for the names of the content classes. 0001 … 0005 …0010 … But as you can see on the screenshot the numbers can also be used to group content classes which are somehow related and/or will probably used in a specific sort order.
Figure 1: SmartTree - Content class folders
As there are a lot of different projects/situations/requirements the ideas described in this article do not meet all requirements and you will possibly feel the need to evolve other concepts and conventions. If so, then make sure to ask the community of SolutionExchange in the forum. Registration is -of course- for free! ….but necessary if you would like to post questions.
Source: First steps – Naming conventions
© copyright 2011 by Manuel Schnitger