[jdom-interest] RE: [doom-interest] The JDOM Model, Chapter 15 of Processing XML with Java

Philip Nelson panmanphil at yahoo.com
Tue May 7 05:46:37 PDT 2002


--- "O'neil, Jerome" <joneil at cobaltgroup.com> wrote:

> This is one of the two major complaints I have about JDOM.   Lack of common
> interfaces.  I think fixing it requires two things.  A clear specification
> of what those interfaces should be, and a major refactoring of the code base
> to implement the specification.
>

There are already two java based xml apis done this way, DOM and dom4j.  A
clear specification!? 

I think the use of concrete classes with the optinal factory has stood up quite
well.  On the other hand, we all seem to feel that somewhere out there is a
single (or perhaps multiple) node definition that will satisfy all the use
cases of xml nodes.  It looks like the effort may be ramping up again.  What
has happened every other time is that a number of proposals came up and none of
them satisfied everybody's use cases.  And most importantly, in subtle ways
they were all incompatible.  They were also occasionally incompatible with
existing jdom methods requiring awkward naming schemes. 

I think a node interface is a fantastic idea.  I think you should use one in
many applications of which jdom and xml is a part.  And, you should design and
code it yourself to do or be exactly what you want.  Jdom support this by being
very easy to subclass. Using the decorator pattern, a large number of other
possibilities are available to you. An existing node interface would in fact
make it harder, not easier to implement a node for your application because of
problems with method parameter signatures, exceptions thrown, return types
etc.. 

Unless of course somebody comes up with the "One Node" that solves all these
problems. 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com



More information about the jdom-interest mailing list