[jdom-interest] Fast Factory

Elliotte Rusty Harold elharo at metalab.unc.edu
Tue May 27 06:19:52 PDT 2003


At 7:07 AM -0400 5/27/03, Rolf Lear wrote:

I am struggling to think of circumstances where sub-classing makes sense.



There are three prime reasons for subclassing:

1. To change the storage model; e.g. to sit JDOM on top of an 
underlying native XML database.

2. To add additional methods that are useful in the local 
environment, but are not present in JDOM; e.g. 
verifyElementAgainstDatabase or readElementAsInt

3. To make more specific classes for a specific application, e.g. 
HTMLPElement, HTMLDivElement, HTMLTableElement, etc.
-- 

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Processing XML with Java (Addison-Wesley, 2002)
   http://www.cafeconleche.org/books/xmljava
   http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA



More information about the jdom-interest mailing list