Joe --
I think when you're designing a whole framework like DTM, interface
based design makes a lot of sense and is definitely the way to go. Here
we're talking about a single class to implement a variable stack. I
just don't see that many people taking the trouble to implement it in an
entirely different way and it seems like overkill to use both an
interface and an abstract base class. In theory, there is only one
variable stack per transformer. Even if someone wanted to completely
override the implementation, the only penalty would be 5 null reference
member fields left over. Maybe that's enough reason to go to the
interace and abstract base class approach but I just hate creating extra
interfaces and classes if they're never (or hardly ever) going to be
used.
Just my two cents,
Gary
[EMAIL PROTECTED] wrote:
>
> >Scott, what do you think about making this an abstract class instead of
> >an interface?
>
> How about an interface plus an abstract base class that can be used as a
> starting point by implementations?
>
> Example: DTM is an interface, DTMDefaultBase is an abstract base class,
> iteration is layered on top of that (still abstract), and finally the
> concrete SAX2DTM and DOM2DTM classes are derived from those.
>
> The advantage is that if someone wants to use an entirely different
> internal architecture, they can implement the interface directly.