GoF Design Patterns
by Shaimaa Ali
1. Behavioural (problems related to interactions between objects/classes)
1.1. Chain Of Respopnsibilites (decouples the client requesting processing form the chain of handlers)
1.2. Comman (Encapsulate a command and allow for variation of the application depending on the reciever)
1.3. Interpreter (configuring a simple grammer in tree-like structure)
1.4. Iterator (allow for navigating through an aggregation)
1.5. Strategy (allows for variations of an algorithm)
1.6. TemplateMethod (Maintains a sequence of steps of an algorithm while allowing variations in the steps themselves)
1.7. Observer (one-to-many relationship to propagate updates of a a given subnect)
1.8. Mediator (many-to-many propagation of changes)
1.9. Visitor (Allows for applying an operation to an object that wasn't part of its definition)
1.10. Memento (allows to create historical log of changing state)
1.11. State (Encapsulates the variouse states and the logic that depends on them)
2. Creational (problems related to object instantiation/creation)
2.1. Singleton (restrict object creation to exactly single object)
2.2. Factory
2.2.1. Method (defer the instantiation of the subtype of the product to the subtype of the client/creator)
2.2.2. Abstract Class (Encapsulates multiple factory methods of related products)
2.3. Prototype (duplication of complex objects)
2.3.1. Shallow
2.3.2. Deep