[jdom-interest] Interface-based JDOM

Brett McLaughlin brett at newInstance.com
Sat Dec 2 18:52:19 PST 2000


Tom Bradford wrote:
> 
> Hi All,
> 
> Here's an Interface-based JDOM I quickly threw together to prove that it
> doesn't hurt the implementation at all, but actually enhances it.
> Internally, all references now use the interfaces instead of the
> concrete classes.  I only changed the org.jdom package, none of the
> subpackages.
> 
> I chose to prefix interfaces with an I, but I think the most convenient,
> and backward-compatible way to do it would be to actually change the
> classes to interfaces and prefix the classes with something like JDOM or
> J.
> 
> So for example:
> 
> Element.java would become JDOMElement.java
> IElement.java would become Element.java
> 
> and so on.  I also think the implementation and interfaces should be
> placed in separate packages, but again.  I threw this together really
> quickly.
> 
> I don't want to start a religious war here, but if JDOM has any
> intentions of being widely adopted, the rigid implementation decisions
> that have been made need to be rethought.  Otherwise, my product (and
> probably many others) can't implement/utilize it effectively.

Why? You are stating your preference, and then calling it "the only way
that things will be widely accepted." I think that's pretty much a
reach. Clearly, JDOM is already widely accepted. JDOM, as it is now,
specifically without interfaces, is what Sun, the J2EE team, and the JSR
folks want to adopt. JDOM, as it is now, is being used in many systems.
And nobody has yet clearly stated a good use-case for interfaces that
concrete classes cannot solve easily. Additionally, nobody has been able
to answer the serious questions that interface-based systems initiate,
such as importing nodes, ability to work with multiple implementations
at the same time, and the huge amount of working code that you break
with your changes.

We're so far from even considering this, I just can't over-express it.
No offense to you, personally, Tom, but you are substituting your
preference and convenience over what is really a simple issue - we want
concrete classes, and nobody has yet even put together much of a case
against them.

-Brett

> 
> --
> Tom Bradford
> Founder & Chief Architect
> The dbXML Group, L.L.C.
> http://www.dbxmlgroup.com
> 
>   ------------------------------------------------------------------------
>                          Name: Interface-JDOM.zip
>    Interface-JDOM.zip    Type: Zip Compressed Data (application/x-zip-compressed)
>                      Encoding: base64



More information about the jdom-interest mailing list