Need help ! Best practices for content model

cancel
Showing results for 
Search instead for 
Did you mean: 
Chawwalit
Member II

Need help ! Best practices for content model

Jump to solution

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 Solution

Accepted Solutions
angelborroy
Alfresco Employee

Re: Need help ! Best practices for content model

Jump to solution

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 solution in original post

4 Replies
angelborroy
Alfresco Employee

Re: Need help ! Best practices for content model

Jump to solution

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
Chawwalit
Member II

Re: Need help ! Best practices for content model

Jump to solution

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

 

angelborroy
Alfresco Employee

Re: Need help ! Best practices for content model

Jump to solution

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
Chawwalit
Member II

Re: Need help ! Best practices for content model

Jump to solution

Thank you Very Very much.Smiley HappyHeart