Design Patterns

  1. About Design Patterns
  2. Creational Patterns
    1. Factory Method --Creates an instance of several derived classes
    2. Abstract Factory --Creates an instance of several families of classes
    3. Builder --Separates object construction from its representation
    4. Prototype --A fully initialized instance to be copied or cloned
    5. Singleton --A class of which only a single instance can exist
  3. Structural Patterns
    1. Adapter --Match interfaces of different classes
    2. Bridge --Separates an object’s interface from its implementation
    3. Composite --A tree structure of simple and composite objects
    4. Decorator --Add responsibilities to objects dynamically
    5. Facade --A single class that represents an entire subsystem
    6. Flyweight --A fine-grained instance used for efficient sharing
    7. Proxy --An object representing another object
  4. Behavioral Patterns
    1. Chain of Responsibility --A way of passing a request between a chain of objects
    2. Command --Encapsulate a command request as an object
    3. Interpreter --A way to include language elements in a program
    4. Iterator --Sequentially access the elements of a collection
    5. Mediator --Defines simplified communication between classes
    6. Memento --Capture and restore an object's internal state
    7. Observer --Alter an object's behavior when its state changes
    8. State --Alter an object's behavior when its state changes
    9. Strategy --Encapsulates an algorithm inside a class
    10. Template Method --Defer the exact steps of an algorithm to a subclass
    11. Visitor --Defines a new operation to a class without change
  5. J2EE Patterns
    1. MVC --Decouple the relationships among data, representation and controller
    2. Business Delegate --An intermediate class between presentation-tier clients and business services.
    3. Composite Entity --manage interactions between fine-grained or coarse-grained internally
    4. Data Access Object --Adapt a uniform interface to access multiple databases
    5. Front Controller --Using a single component to process application requests
    6. Intercepting Filter --A pluggable component to intercept incomming requests/responses
    7. Service Locator --Centralizing distributed service object lookups
    8. Transfer Object --A serializable class to act as data carrier, grouping related attributes
  6. Miscellaneous
    1. typesafe enum
    2. RESTful WS