[jdom-interest] Interesting XML benchmarks (inc JDOM)

Jason Hunter jhunter at collab.net
Fri Jun 1 13:19:09 PDT 2001

> Any API is possible of being thin and fast.  

Really?  I don't think that's true.  There are definitely some namespace
approaches you could take (which we thought about) which would have
required walking the entire tree multiple times on output.  You can
definitely shoot yourself in the foot when defining an API.  We've tried
to keep from shooting, and even allow for a design with future
optimizations to be possible -- like optimized deferred building.

> Including interface based factory driven APIs.  The arguments that 
> I had always heard were that factories are slow and awkward 

I've never said factories were slow.  The reason for not wanting
factories to be used for all object creation was and is entirely about
the convenience to users.  Factories in builders was always a good idea,
and it's been in the TODO for a long time.  I'm glad we have them now.

> My experience is that, in the past, anyone who's ever suggested patterns
> and practices that were out of line with the authors' original vision of
> JDOM was met with immediate resistance and condescension.  

I know you were trying to give a compliment, and I appreciate it, but
from my perspective I don't think there's been any change.  We actually
started JDOM with interfaces, had it all implemented that way, and
before our first release early reviewers convinced us that concrete
classes would be better.  We changed course 180 degrees.  On the null vs
exception debate, both Brett and I preferred exceptions, but null was
the user vote and that's what we have.  I really hope I haven't come
across as resistant or condescending.

> This HAS
> changed in the past couple of months, where now, a lot of those ideas
> that you initially turned your back to are finding their way into the
> API.  

I personally haven't turned my back on anything.  I play devil's
advocate and require changes to be fully justified, but if they can be
justified and gain support, they go in.

> Ok, I'm done.. Jeez, try to give someone a complement.

Ha, thanks.  It's kind of like telling someone you like their new
hairstyle, and they respond, "What, you didn't like it before?"  :-)


More information about the jdom-interest mailing list