directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject [CONSTANSTS] Conventions and Update
Date Sat, 14 Apr 2007 19:30:01 GMT
Hey Guys,

I noticed that we are missing:
     String TOP_AT = "top";

In SystemSchemaConstants.

I was going to add it, but noticed that SystemSchemaConstants
now only contains a single value:

String SCHEMA_NAME = "system";

Did the other stuff get moved?

Also, I think our code would be much easier to read
if we agree to use a set of conventions for naming
constants.

I personally would much rather see:

String TOP_ATTRIBUTE_TYPE_NAME = "top";
String CN_ATTRIBUTE_TYPE_NAME = "cn";

As a general convention I think we should always spell out what
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 if we spell them out).

Then we make sure the convention for defining a specific
type of constant within the java file...can move to
a conventions section in some design guide later.

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.

I think we are spelling most things out fully,
so this is just a suggestion for making it a formal convention.

WDYT (I know I should have spelled it out fully :-) )?

Cheers,
- Ole



Mime
View raw message