DotNetAge - Mvc & jQuery CMS

Behavioral Patterns

  • rss
  • atom

Template Method

avatar
Ray

Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.


  • 6/17/2011 5:30:59 AM
  • Votes (0)
  • Reads
    (2145)
  • Comments
    (0)

Visitor

avatar
Ray

Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.


  • 6/17/2011 5:25:41 AM
  • Votes (0)
  • Reads
    (1973)
  • Comments
    (0)

Strategy

avatar
Ray

Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.


  • 6/17/2011 5:18:45 AM
  • Votes (0)
  • Reads
    (1938)
  • Comments
    (0)

State

avatar
Ray

Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.


  • 6/17/2011 5:07:47 AM
  • Votes (0)
  • Reads
    (1680)
  • Comments
    (0)

Observer

avatar
Ray

Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.


  • 6/17/2011 5:01:28 AM
  • Votes (1)
  • Reads
    (2033)
  • Comments
    (0)

Memento

avatar
Ray

Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.


  • 6/17/2011 4:52:12 AM
  • Votes (0)
  • Reads
    (1877)
  • Comments
    (0)

Mediator

avatar
Ray

Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.


  • 6/17/2011 4:45:22 AM
  • Votes (0)
  • Reads
    (1693)
  • Comments
    (0)

Interpreter

avatar
Ray

Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.


  • 6/17/2011 4:03:51 AM
  • Votes (0)
  • Reads
    (1381)
  • Comments
    (0)

Chain of Responsibility

avatar
Ray

Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.


  • 6/17/2011 3:57:50 AM
  • Votes (0)
  • Reads
    (1287)
  • Comments
    (0)

Command

avatar
Ray

Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.


  • 6/17/2011 3:51:35 AM
  • Votes (0)
  • Reads
    (1316)
  • Comments
    (0)

Iterator password

avatar
Ray

Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.


  • 6/17/2011 12:00:00 AM
  • Votes (0)
  • Reads
    (1113)
  • Comments
    (0)