Patterns

Design patterns tell us how to structure classes and objects to solve certain problems
It is common for libraries and frameworks to make use of design patterns in their implementation.
Built around the key OO concepts: abstraction, inheritance, polymorphism, encapsulation


Encapsulate what varies or changes
Have composition over inheritance
Program to interfaces not implementations
Classes should be open for extension but closed for modification.


Patterns show you how to build systems with good OO design qualities


compound pattern ??


Pattern Categories

CreationalObjectFactory
Involve object instantiation with a way of decouplying a client from the objects it needs to instantiateObjectBuilder
 ObjectPrototype
 ObjectSingleton
   
BehaviouralObjectChain of Responsibility
How classes and object interact and distribute responsibilityObjectCommand
 ClassInterpreter
 ObjectIterator
 ObjectMediator
 ObjectMemento
 ObjectObserver
 ObjectState
 ObjectStrategy
 ClassTemplate Method
 ObjectVisitor
   
StructuralClassAdapter
Let you compose classes or objects into larger structuresObjectBridge
 ObjectComposite
 ObjectDecorator
 ObjectFacade
 ObjectFlyweight
 ObjectProxy




© 2017 Better Solutions Limited. All Rights Reserved. © 2017 Better Solutions Limited

Next