For example, the Database factory in JDBC is well designed, requiring only that a simple set of interfaces must be supported. However, the configuration, installation and use of new factories by developers is notoriously difficult. Unfortunately, many designers use the factory pattern to avoid proper requirements analysis. The result is a dynamically extended system that is impossible to maintain and manage. Designers should implement factories only when mandated by the requirements of the system and not as a hedge to avoid defining those requirements up front.
Inheritance allows developers to create reusable and flexible designs.
However, these added features extract a toll. A designer can be manage this added complexity by carefully considering what purpose the inheritance is to serve and looking for the common pitfalls. Excite Inc. Seattle, and an adjunct professor of Software Engineering at Seattle University. Downloads, articles, tips, and training at Forte for Java Developer Resources.