[jdom-interest] Re: Fast or Safe?
Trebor A. Rude
trebor at bwn.net
Thu Aug 31 17:10:48 PDT 2000
On Thu, 31 Aug 2000, Gerardo Horvilleur wrote:
>Why not make Element, Document, Attribute, etc. interfaces instead of
> classes?
>
>Then we could have a fast implementation of those interfaces and a safe
>implementation (and maybe more: what about a thread safe implementation?)
Hmm, if we do that, we could create a sigleton factory class to return
you the proper implementation of the interface based on some settings it's
got stored. At the very least, the programmer would be forced to manually
create objects of the correct implementation. Of course, either way would
probably break every existing JDOM program out there, as the "Element foo
= new Element("foo");" idiom would break. Even though we could, with the
claim "the API is pre-1.0", I'm not sure many people would be very happy
if we did that. Design wise, it sounds fine though.
--
Trebor A. Rude
trebor at bwn.net
Registered Linux User #89308
http://counter.li.org/
More information about the jdom-interest
mailing list