[jdom-interest] Code submision: JDOM2 the dual tree implement ation...

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Nov 29 05:45:51 PST 2000


At 10:33 AM +0000 11/29/00, James Strachan wrote:

>I think the more we discuss issues of immutability, instance sharing, singly
>/ doubly linked trees and possibly efficient caching of XPath / getChild() /
>getAttribute() methods I'm increasingly coming to the conclusion that we
>need good interface / abstract base classes for Element / Attribute et al
>and a library of various implementations for different use cases with a
>couple of tree builders.

The more we discuss issues of immutability the more I'm convinced 
this is a bad idea, and definitely something I don't want in the JDOM 
core, or even as part of the standard JDOM distribution. I think 
throwing UnsupportedOperationExceptions will confuse a lot of 
programmers, and is not something we should encourage.

It strikes me that what you really want is a small, fast, READ-ONLY 
tree-based API. That's a good idea and it fills a lot of important 
needs. But JDOM is not trying to be that and should not try to be 
that. JDOM has always been conceived as a READ-WRITE API, and I think 
we should keep it that way. I don't think we should make compromises 
to support a read-only API. I think that should be a separate API and 
a a separate project.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|                  The XML Bible (IDG Books, 1999)                   |
|              http://metalab.unc.edu/xml/books/bible/               |
|   http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ |
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list