Should a company's custom jcr property names contain a namespace? | Community
Skip to main content
nesfel_aem
Level 3
December 19, 2018
Solved

Should a company's custom jcr property names contain a namespace?

  • December 19, 2018
  • 4 replies
  • 2112 views

If your company is named MyCo and you sell books, you might want to store properties like total pages for book nodes in the JCR.  Are you supposed to name your company's custom JCR properties so that they start with a namespace?  If so, should your custom properties always start with the namespace jcr: or something else like myco: (inspired by your company name)?  We've seen consultants use both, e.g., totalPages or jcr:totalPages.

We're just trying to be consistent with what the rest of community is doing.  If there's a document with naming conventions, that would be great too, but this was the closest we could find so far (http://jackrabbit.apache.org/jcr/ocm/mapping-bean-fields.html).  Thanks so much for taking the time to read this question, and really appreciate how helpful Adobe and its community members are.

-Nestor

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Hey - naming is typically done as a convenience - not a hard rule. You can name your custom properties to match your organization if you feel this will improve you business processes. However - there is no hard rules. Here is a good guide line when working with the JCR - David rules:

Data Modeling - David Nuescheler's Model

Hope this helps...

4 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
December 19, 2018

Hey - naming is typically done as a convenience - not a hard rule. You can name your custom properties to match your organization if you feel this will improve you business processes. However - there is no hard rules. Here is a good guide line when working with the JCR - David rules:

Data Modeling - David Nuescheler's Model

Hope this helps...

nesfel_aem
Level 3
December 19, 2018

smacdonald2008​, thanks a lot for the quick reply.  It definitely helps!  Based on your answer (and well known expertise), I think we'll avoid including namespaces in our custom property names.  Good to know it's an option, but not a hard rule.

joerghoh
Adobe Employee
Adobe Employee
December 20, 2018

Including custom namespaces is possible, but in most cases there's no value in doing so (sometimes it can even create issues you were not aware of in the first place).

nesfel_aem
Level 3
December 20, 2018

Jorg, thanks for your additional perspective.  Very nice to know that the added complexity could even cause us unexpected issues.  Going to follow the KISS principle!