cancel
Showing results for 
Search instead for 
Did you mean: 

Best practices: Content Model namespace prefix

nikes
Champ on-the-rise
Champ on-the-rise
Hi guys I need suggestion to design content model containing various departments documents.

I am developing a solution for our organization which stores all types of documents from various departments say….

Presales       - Various documents like Proposal, Presentations, Product Knowledge base etc…….
Project        - Various documents like SRS, Purchase order, Master service agreement  etc….
Commercial - Documents like Invoice, Statement Of Work, billing documents, Non disclosure agreement etc…
People         - Documents like Visa, Passport, Certifications, Resume etc……….

As we see from above, there are around 40-50 content types I have to create.

This is what I have done till……

-> Created 1 model file for our organization with namespace org and single type without properties say orgSmiley SurprisedrgDocs
-> Created 4 model files for presales, project, commercial, people and separate model file to define constraints.
-> In each model files people, project etc….. I defined new namespace prefix like people, project, commercial, presales, orgConstraints etc….


Now my question is………

Is it a good idea, in above case to define separate namespace for presales, project, people etc….. or I should use only one namespace org in all model files by importing namespace org?

Which approach will give more flexibility in terms of extending model files and search documents using lucene or APIs etc….

Thanks,
Nikesh
2 REPLIES 2

nancyg
Champ in-the-making
Champ in-the-making
Hello Nikesh,

Jeff Potts has a good article about content models on his site, you can find it here http://ecmarchitect.com/categories/content-management/alfresco-developer-series.

You should read the entire article but here is a brief excerpt:

Don't be afraid to have more than one content model XML file. We haven't talked about exactly 
how content models are defined yet, but when it is time to implement your model, keep this in 
mind: It might make sense to segment your models into multiple namespaces and multiple 
XML files. Names should be descriptive. Don't deploy a model file called “customModel.xml” 
or “myModel.xml”.

Nancy

nikes
Champ on-the-rise
Champ on-the-rise
Thanks Nancy,

I have already bought jpotts's book.

My concern is with searching the contents if I use different namespaces for model files people, project, commercial etc.. instead of 1.

Also in my requirement some document types are common in Project,People and Commercial. So I thought to put those types in super type org.

I will implement my model in multiple files each with its own namespace and prefix. Also I have created separate model file to define all constraints.

Nikesh