directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <>
Subject Re: [ADS 2.0] Naming convention ... again !
Date Mon, 04 Sep 2006 22:58:19 GMT
Emmanuel Lecharny wrote:
> Hi band,
> a question that has already been discussed many times by all the 
> developpers on earth, but again, I need a shared vision.
> So : which convention should we use for interface names?
> Here is the problem :
> I have a BindRequest class which will be extended using the decorator 
> pattern to add toDSML, toPDU, fromDSML and fromPDU methods. I will have 
> two concrete decorators : 
> - BindRequestDsmlDecorator
> - BindRequestAsn1Decorator

These sound fine to me.

> and of course an abstract class called BindRequestDecorator

The abstract class is easy: AbstractBindRequestDecorator ?

> This abstract class will contains a reference to a BindRequest object, 
> and will implements all the BindRequest objects methods.
> At this point, the question arise : why don't we have a BindRequest 
> interface and a BindRequestImpl class? The BindRequest interface will be 
> implemented by the BindRequestImpl and BindRequestDecorator classes.
> Good idea. But then I'm a little bit annoyed by the name 
> BindRequestImpl. So am I with the BindRequestDecorator which could have 
> been AbstractBindRequestDecorator, as we have AbstractMessage, 
> AbstractRequest, etc.

heh ok I'm not helping :)

> To be short :
> Q1 : Should we add an 'I' in front on interface that are not obviously 
> seen as interfaces (like BindRequest : renamed to IBindRequest) (I mean 
> to avoid a collision between an interface name and a class name) ?

Hmmm I've never like this style. -1.

> Q2 : Should we add an 'I' in front of *all* interfaces, breaking the JLS 
> rules ? (so Message will be renamed to IMessage, even if it's obvious 
> that Message cannot be a concrete class)

Yeah -1 on that.

> Q3 : Should we add 'Abstract' in front of abstract class ?


> Q4 : if Q1 and Q2 is *NO !!!*, then which name should we use for class 
> which implements interface : ConcreteBindRequest, BindRequestImpl ?

Either is fine w/ me as long as we're consistent.  Concrete prefix is 
not bad.  I kind of like the fact that it's what the GoF did in their 


View raw message