cancel
Showing results for 
Search instead for 
Did you mean: 

Need help ! Best practices for content model

Chawwalit
Champ in-the-making
Champ in-the-making

I'm going to start using Alfresco community.

So I have a question about creating a content model.
1. Can you give me a good example of making content model, aspect, custom type?
2. How should I use the content model, aspect, type? In what situations should I use it?
3. Could you give me a sample content model file?

1 ACCEPTED ANSWER

There are a number of differences between Aspect and Type:

  • A node can only have one type applied but it can have multiple aspects applied
  • It's required that a node is associated with a type, but nodes may have no aspects
  • Aspects can be added and removed to a node, while you can only specialize the type of the node (set a type child of the current type)

By default Alfresco provides cm:content (files) and cm:folder types, but you can extend both if your use case requires additional specialization.

By default Alfresco provides a number of aspects, like cm:titled, cm:versionble or cm:classifiable. You can have some documents from a type having the Titled aspect while other documents from the same type don't have it.

Hyland Developer Evangelist

View answer in original post

4 REPLIES 4

angelborroy
Community Manager Community Manager
Community Manager

You may start following this tutorial:

https://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html

That includes the main concepts and also a sample implementation for them.

Hyland Developer Evangelist

I read it but I don't understand. Custom Type vs Aspect. How is it different?

There are a number of differences between Aspect and Type:

  • A node can only have one type applied but it can have multiple aspects applied
  • It's required that a node is associated with a type, but nodes may have no aspects
  • Aspects can be added and removed to a node, while you can only specialize the type of the node (set a type child of the current type)

By default Alfresco provides cm:content (files) and cm:folder types, but you can extend both if your use case requires additional specialization.

By default Alfresco provides a number of aspects, like cm:titled, cm:versionble or cm:classifiable. You can have some documents from a type having the Titled aspect while other documents from the same type don't have it.

Hyland Developer Evangelist

Thank you Very Very much.Smiley HappyHeart