cancel
Showing results for 
Search instead for 
Did you mean: 

Categories vs Aspects: what to use?

rtitov
Champ in-the-making
Champ in-the-making
We are thinking of using Alfresco in our organization. We have several millions of documents which have to be categorized. The question is, should we categorize using categories or custom aspects? As far as we understand, each approach has its pros and cons.

Categories seem to be better integrated with the Share UI: the node category is shown under the node and there is a category tree which could be used to select all nodes belonging to the same category, e.g. “Contracts”. However, since we will have several thousands of documents in each category, possibility of such navigation does not have much sense anyway.

On the other hand, custom aspects give a possibility to define custom metadata for each type of document, e.g. all contracts can have a “Contract Number” field.

So, what should we choose for our categorization: categories or aspects? Are the any downsides of using aspects instead of categories(e.g. would we have the same search capabilities)? Are there any best practices in this area (i.e. in terms of records management)?

Thank you in advance for a reply.
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Probably use aspects and categories together.     And a category is an aspect anyway.

What you need to decide is what makes sense for your application.

rtitov
Champ in-the-making
Champ in-the-making
What is the advantage of using categories? Why cannot we just have a mandatory aspect with a restricted list of acceptable values, e.g.:


<property name="countryOfOrigin">
  <type>d:text</type>
  <mandatory>true</mandatory>
  <constraints>
     <constraint type="LIST">
       <parameter name="allowedValues">
          <list>
             <value>United Kingdom</value>
             <value>France</value>
             <value>United States</value>
          </list>
       </parameter>
     </constraint>
  </constraints>
</property>

We will still be able to find all nodes with the given country of origin, right? And we will get better CMIS support, since categories (unlike normal aspects) are not supported by CMIS.

Thank you in advance for your answer!

kaynezhang
World-Class Innovator
World-Class Innovator
Alfresco supports multiple classifications.
In alfresco classification is implemented by aspect. applying a classification  to the node is done by adding an aspect to that node. That is to say a category is just an aspect.
The categories that displayed in UI is provided by alfresco is a default classification which is cm:generalclassifiable aspect.
You can add your own classification by adding an aspect whose parent is cm:classifiable.

cm:generalclassifiable  is just a normal aspect,the reason why we can't operate categories by CMIS is that by default category data is stored under workspace://SpacesStore/cm:categoryRoot/ which can't be visited by cmis.