We classify Design patterns by 2 criteria. 1. Purpose 2.
Scope
Purpose reflects what a pattern does Scope specifies whether the pattern applies primarily to classes or to Objects
Purpose
Creational Creational patterns concern the process of Object creation
Structural Structural patterns deal with the composition of classes or objects
Behavioral These patterns characterize the ways in which classes or objects interact & distribute responsibility
Class patterns deal with relationships between classes & their subclasses. These relationships established with inheritance , so they are static fixed at compile-time. Object patterns deal with object relationships , which can be changed at runtime & are more dynamic
Creational class patterns defer some part of object creation to subclasses, while creational object patterns defer it to another object. The structural class patterns use inheritance to compose classes , while the structural object patterns describe ways to assemble objects. The Behavioral class patterns use inheritance to describe algorithms & flow of control , where as the Behavioral object patterns describe how a group of objects cooperate to perform a task that no single object can carry out alone.
Purpose
Scope Class
Factory Method
Adapter(class)
Interpreter Template Method Chain of Responsibilit y Command
Object
Abstract Factory Builder Prototype Singleton
Adapter(object) Bridge Composite Decorator Facade Flyweight Proxy
Iterator Mediator Memento Observer State Strategy Visitor