[jdom-interest] JDOM Beta10 released

Bradley S. Huffman hip at cs.okstate.edu
Tue Feb 17 10:16:45 PST 2004

Rolf Lear writes:

> I think the reality is that the "Content" concept (abstract Content) is a
> really good one, but the "Parent" concept has been poorly received.
> Parent/Child does not really exist conveniently in XML, and "Content"
> unifies almost all the similarities available. "Parent" is a diversifying
> concept, not a unifying concept. This is especially true because "Element"
> is where almost all the interaction with JDom happens, and people are
> familiar with Element.

No what people have been unhappy with is the signature of a "power" method
has changed, namely addContent.  And this is about convenience, nothing else.
In reality if every method, except actual "getters", returned void (i.e.
you removed method chaining) the functionality of the API stays the same,
you'd just have to type a few extra characters. And fewer characters does not
equate to better code.

Now if you want to argue that getParent should return a Element or null
because using the 80/20 rule most users are going to want only a element
parent, I'd find that acceptable.  But insisting on making design decision
to support tricks like method chaining is just wrong IMHO.


More information about the jdom-interest mailing list