directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <akaras...@apache.org>
Subject [ApacheDS] [Schema] Refactoring interfaces to classes
Date Fri, 28 Aug 2009 18:55:47 GMT
There was a reason why I had interfaces and it starts to show when we have
one implementation which wraps another.  Containment is not as clean as it
can be.  For example a CachingNormalizer extends Normalizer extends
SchemaObject, and CachingNormalizer delegates using containment to another
Normalizer.

SchemaObjects have an OID.  And so there are now two variables for storing
OID: one in the contained object and one in the container.  These kinds of
harmless annoyances creep up if you design exclusively with classes.

I'm starting to get leery of people trying to refactor a certain way just
because it gets rid of Java source files.  Interfaces are harmless and
always the best way to go especially when you don't know what you are doing.

-- 
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org

Mime
View raw message