Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

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...

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

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...

Avatar

Level 3

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.

Avatar

Employee Advisor

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).

Avatar

Level 3

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!