AnsweredAssumed Answered

Throw-away namespaces and prefixes to the rescue...?

Question asked by oofdachile on Sep 15, 2013
Latest reply on Oct 25, 2013 by tomoconnell
Hi, folks –

  If you haven't read Jeff's "Working with Custom Content Types" guide:

http://www.ecmarchitect.com/images/articles/alfresco-content/content-article-2ed.pdf

… then you now have your lunch-hour assignment for the week.

  Point #3 in his "Content Modeling Best Practices" section reports that content models are not chalk on a chalkboard:  while we can usually add to a content model safely, we shouldn't expect to be able to change an existing model any way we want after it has been read by the Alfresco server.

  As a follow-on, I wonder if some of these headaches could be avoided by developing content models in throw-away namespaces with throw-away prefixes, such as …


<namespaces>
   <namespace uri="http://www.ourCompany.com/OurDepartment/PortraitTest/7.0" prefix="portTest007"/>
</namespaces>


When (when!) this test model is discovered to have an irreversible design flaw, could we not avoid some of the headaches pointed out in Jeff's document by changing this model's namespace & prefix to something like this:


<namespaces>
   <namespace uri="http://www.ourCompany.com/OurDepartment/PortraitTest/8.0" prefix="portTest008"/>
</namespaces>


… and then making the needed changes to the model?  When the model's development is complete, then the meat of the model could be moved into a production metadata model, or this model's namespace and prefix could be changed to something like:


<namespaces>
   <namespace uri="http://www.ourCompany.com/OurDepartment/Portrait/1.0" prefix="port001"/>
</namespaces>


What do you think of an approach like this?

Don

Outcomes