Thursday, January 18, 2007

Design Patterns

  • From a list, select the most appropriate design pattern for a given scenario. Patterns will be limited to those documented in Gamma et al. and named using the names given in that book.
  • State the benefits of using design patterns.
  • State the name of a design pattern (for example, Gamma) given the UML diagram and/or a brief description of the pattern's functionality.
  • Select from a list benefits of a specified design pattern (for example, Gamma).
  • Identify the design pattern associated with a specified J2EE feature
Design Patterns(23)
Benefits: Proven solutions, promote reusability, Expressive.
GOF patterns Creation
  • Abstract Factory - Allows a client to create families of objects without knowing their concrete classes.
  • Builder
  • Factory Method - Subclasses decide which concrete classess to create.
  • Prototype
  • Singleton - Ensures one and only object is created.

  • Chain of Responsiblity
  • Command - Encapsulates a request as an object.
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer - Allows objects to be notified when state changes.
  • State - Encapsulate state based behaviour and use delegation to switch between behaviour.
  • Strategy - Encapsulates interchangeable behaviour and used delegation to decide which ones to use.
  • Template Method - Subclasses decide how to implement steps in an algorithm.
  • Visitor
  • Adapter - Wraps an object and provides an interface to it.
  • Bridge
  • Composite - Client treats collection of objects and individual objects uniformly.
  • Decorator - Wraps an object to provide new behaviour.
  • Facade
  • Flyweight
  • Proxy - Wraps an object to control access to it.

Feature Pattern
EJB Home
  • Factory
  • Abstract Factory
EJB Remote
  • Proxy
  • Facade
  • Decorator
Session beans that model workflow
  • Facade
EJB instance pooling
  • Flyweight
Value object
  • Memento
JDBC Resultset
  • Iterator
JDBC, JMS, JCA, or any bridging technology
  • Bridge
  • Singleton
Servlet filters
  • Chain of Responsibility
  • Decorator
  • Observer
  • Mediator

Need to know all patterns, able to differential between the similiar and identify them from givem UML diagrams.
Books used HeadFirstPatterns/ Developer works/ MarkCade's SCEA.

No comments:

Post a Comment