AnsweredAssumed Answered

Best Practice;  Short vs Long Namespaces in code

Question asked by simon.white on May 10, 2011
Latest reply on May 10, 2011 by mrogers
Hello all,

When referencing entities stored in Alfresco, particularly when using the Javascript APIs (in Java we can often use the rich QName object to model qualified names), we frequently have a choice about how we refer to the qualified name of an aspect, property, path element etc - we can use the full namespace, say, {http://surevine.com/alfresco/aclient/foobar}myentity or a shortened version, perhaps sv:myentity.

My question is fairly simple: Is the use of one form generally preferred over the other?

I've just updated our internal coding standards to suggest that developers use the shorter form rather than the longer one to improve readability, but I'd be interested to know what others thoughts were.

Thanks in advance,

Simon

Outcomes