cancel
Showing results for 
Search instead for 
Did you mean: 

understandig namespaces

tim-erwin
Champ in-the-making
Champ in-the-making
Hi!

I kinda know, what namespaces are (e.g. in programming languages, wikis etc…). I am, however, new to content management. So, could someone briefly explain, what namespaces in Alfresco are or where to find information about that concept (the Terminology Guide doesn't describe it). All I could find so far is, that they are implemented as a kind of aspects, right?

To be more specific: Why do we need all the namespaces in a way like that: "/app:company_home/cm:sample_folder"? Why not just "/company_home/sample_folder"?

Thanks in advance,
Tim-Erwin
4 REPLIES 4

davidc
Star Contributor
Star Contributor
A namespace is a namespace - it's a way of disambiguating items having the same name.  So, we use them when defining content models etc.

The most peculiar use is for node names (this comes from JSR-170).  So, as you see we use app and cm namespaces.  But, you don't have to.  You can have the path /app:company_home/sample_folder/sample1.

tim-erwin
Champ in-the-making
Champ in-the-making
Thank you! However, I don't understand the difference between having paths to distinguish between two items with identical names (as it is done on any ordinary filesystem) and using namespaces instead. Perhaps there is none :?
And a second short question: What's the difference between app and cm namespaces? Just the letters or do they have a meaning?
Still: I'm willing to read about that topic rather than bothering you, so if you know about a good resource, please tell me.

Regards,
Tim-Erwin

davidc
Star Contributor
Star Contributor
Thank you! However, I don't understand the difference between having paths to distinguish between two items with identical names (as it is done on any ordinary filesystem) and using namespaces instead.

In the world of folders & files, I agree.  However, JSR-170 goes further and allows arbitrary hierarchical structures to be stored, managed & retrieved i.e. an XML document.  And in these cases, namespaces are important.

What's the difference between app and cm namespaces? Just the letters or do they have a meaning?

The cm namespace is used to represent items in our core content model (e.g. folders, files, categories, people etc) - basically those things that may be shared across applications.  The app namespace is used to represent items specific to our Web Client.

Still: I'm willing to read about that topic rather than bothering you, so if you know about a good resource, please tell me.

I'm responding as we don't currently have any docs on this particular concept.

tim-erwin
Champ in-the-making
Champ in-the-making
Thank you, that clarifies a lot. I appreciate.

Regards,
Tim-Erwin