Monday, August 3, 2009

Patterns

"Decoupling objects so that changes to one can affect any number of others without requiring the changed object to know the details of others" - Observer pattern

"Group objects and treat them the group like an individual object. Create a class hierarchy in which some subclasses define primitive objects and other classes define composite objects that assemble the primitives into more complex objects" - Composite pattern

"An object that represents an algorithm is a strategy. When you want to replace the algorithm(s) used for a task, either statically or at runtime, you can encapsulate the algorithm within an object" - Strategy pattern

No comments: