Visit Map

Monday, August 20, 2007

Abstract Factory Applicable Scenarios and

Abstract Factory Applicable Scenarios
The system needs to be independent of how its objects are created,composed, and represented.The system needs to be configured with one of a multiple family of objectsThe family of related objects is intended to be used together and thisconstraint needs to be enforced.You want to provide a library of objects that does not show implementationsand only reveals interfaces
J2EE Technology Features and J2SE API Association
Data Access Object (Sun)Value Object Assembler (Sun)Builder Applicable senarios
The algorithm for creating a complex object needs to be independent of thecomponents that compose the object and how they are assembled. The construction process is to allow different representations of theconstructed object.
javax.ejb.EJBHome javax.ejb.EJBLocalHome javax.jms.QueueConnectionFactory javax.jms.TopicConnectionFactory
CompositeThe following scenarios are most appropriate for theComposite pattern:¦ You want to represent a full or partial hierarchy of objects.¦ You want clients to be able to ignore the differences between the varyingobjects in the hierarchy.¦ The structure is dynamic and can have any level of complexity: for example,using the Composite view from the J2EE Patterns Catalog, which is usefulfor portal applications.
Decorator Applicable Scenarios
You want to transparently and dynamically add responsibilities to objectswithout affecting other objects.¦ You want to add responsibilities to an object that you may want to change inthe future.¦ Extending functionality by subclassing is no longer practical