|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Reusing, Refactoring, Reinventing??? (was Re: SA
Elliotte Rusty Harold wrote: > As to reuse, this is a textbook case of > how not to reuse. One can reuse implementation and one can reuse interface. Sometimes, you can reuse both at the same time. Nonetheless, it is still reuse if you reuse only one and not the other. > However, the argument is whether to put this into SAX > itself rather than somebody's personal local classes. No. I don't care if the saxproject.org site ever says "This is part of SAX." I'm just suggesting an extension to SAX that makes sense for some people. And, as far as I know, there isn't really a difference between "somebody's personal local classes" and a set of classes that are "personal" to more than one person. How is SAX itself different from a "personal local class?" > TypedContentHandler is not a ContentHandler. > It merely acts like one. Right. TypedContentHandler works exactly like ContentHandler except that it can do just a little bit more. This is reuse of the interface (and much, but not all, of the implementation as well). The contract presented by TypeContentHandler is precisely the same as the contrat presented by ContentHandler -- except that TypedContentHandler can do a little more. Its like if you create a "Person" class and then created "Man" and "Woman" subclasses that can do specific things that the generic "Person" doesn't do to well. This is classic computer science... bob wyman
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








