This topic is a proposal for a naming convention for the identifiers of the User Interface Extension Points (UIXP).
The proposal below is based on existing conversations (here, here, and here) as well as the actual naming of existing UIXP and UIX ( <extensionPointId>.+</extensionPointId>
in xml files of the platform).
UIXP naming convention
A UIXP id should be <groupId>.<moduleName>.<uixpQualifier>
.
<groupId>
must be in the form [a-z]+(\.[a-z]+)*
and match the groupId of the module in witch it is first used.
<moduleName>
must be in the form [a-z]+
and match the module name, for instance panels
for an UIXP declared in xwiki-platform-panels
or user.directory
for xwiki-platform-user-directory
.
<uixpQualifier>
must be in the form [a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*
and be descriptive of the intent of the UIXP, especially if a module declared multiple UIXP.
UIX naming convention
Having a strong convention for UIXP ids is critical as they cannot be modified once introduced in a release. Having a naming convention of UIX is not as critical but is still interesting to discuss.
Looking at their use in existing code, the implicit norm tend to follow <groupId>.<moduleName>.<uixQualifier>
.
The use of <groupId>
and <moduleName>
is similar to UIXP.
<uixQualifier>
must also be in form [a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)*
and be descriptive of the contribution that the UIX does in regard to the UIXP.
WDYT?
Once we reach an agreement, I will report the final naming convention in XWiki’s development documetation.