You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <di...@incubator.apache.org> on 2007/08/23 21:34:31 UTC

[jira] Resolved: (DIR-209) Convention for Naming Constants

     [ https://issues.apache.org/jira/browse/DIR-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny resolved DIR-209.
-----------------------------------

    Resolution: Fixed

I think that what has been done in LdapConstants, SchemaConstants and MetaSchemaConstants is ok. 
AttributeTypes -> AT
ObjectClasses -> OC
oids -> OID

> Convention for Naming Constants
> -------------------------------
>
>                 Key: DIR-209
>                 URL: https://issues.apache.org/jira/browse/DIR-209
>             Project: Directory
>          Issue Type: Task
>          Components: miscellaneous
>            Reporter: Ole Ersoy
>            Assignee: Ole Ersoy
>            Priority: Minor
>
> Our code would be much easier to read if we agree to use a set of conventions for naming constants.
> Here's an example:
> String TOP_OBJECT_CLASS_NAME = "top";
> String CN_ATTRIBUTE_TYPE_NAME = "cn";
> As a general convention we should always spell out
> fully what something is (With a few exceptions for things like DIT,
> etc. that are really well defined within their Conceptual Domain, and
> would make the constant string really long.
> Right now we have things like:
> M_OID_AT
> MR_OID
> etc.
> And I can guess what these mean fairly easily, but as we
> add more and more, this just adds to the cognitive load
> of understanding the code base, and ultimately slows development,
> especially for newcomers.
> Cheers,
> - Ole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.