Java gravel of the day: poor API design

jdavidb on 2008-10-13T20:53:06

What a piece of work is NodeList. Nobody seemed to think of making NodeList implement List, and that's somewhat bizarre, and worse, inconvenient.

Crying for XML::TreeBuilder over here, today...

As I always say, why reuse fundamental classes and interfaces when you can reinvent the wheel, and make it square in the process!


W3C

ChrisDolan on 2008-10-15T03:24:32

I think the NodeList problems come from an implementation that follows the W3C API too strictly. The win, of course, is that you can swap out back-end implementations on a whim, but given how infrequently that happens, the painful API is a net loss.

I gotta say, though, the ubiquity of the standard XML APIs is really appealing in Java though. Just knowing that I don't have to think twice about firing up the XSL transformer is nice.