stephenson college dp 98 1 design patterns by derek peacock
TRANSCRIPT
![Page 1: Stephenson College DP 98 1 Design Patterns by Derek Peacock](https://reader036.vdocuments.net/reader036/viewer/2022083009/5697bfd81a28abf838caf2de/html5/thumbnails/1.jpg)
Stephenson College DP 98 1
Design Patterns
by Derek Peacock
![Page 2: Stephenson College DP 98 1 Design Patterns by Derek Peacock](https://reader036.vdocuments.net/reader036/viewer/2022083009/5697bfd81a28abf838caf2de/html5/thumbnails/2.jpg)
Stephenson College DP 98 2
Introduction
Designing OO software is hard Specific enough for current problem General enough for future requirements Experts reuse past design solutions Patterns of classes to solve specific design
problems
![Page 3: Stephenson College DP 98 1 Design Patterns by Derek Peacock](https://reader036.vdocuments.net/reader036/viewer/2022083009/5697bfd81a28abf838caf2de/html5/thumbnails/3.jpg)
Stephenson College DP 98 3
What is a Pattern
A Pattern NameName A ProblemProblem (When to apply the pattern) The SolutionSolution (How to solve the problem)ConsequencesConsequences (Space, time, flexibility,
portability, extensibility)
![Page 4: Stephenson College DP 98 1 Design Patterns by Derek Peacock](https://reader036.vdocuments.net/reader036/viewer/2022083009/5697bfd81a28abf838caf2de/html5/thumbnails/4.jpg)
Stephenson College DP 98 4
Design Patterns
Creational Creating objects
Structural composition of objects
Behavioural Interaction between objects
![Page 5: Stephenson College DP 98 1 Design Patterns by Derek Peacock](https://reader036.vdocuments.net/reader036/viewer/2022083009/5697bfd81a28abf838caf2de/html5/thumbnails/5.jpg)
Stephenson College DP 98 5
Creational Patterns
Abstract Factory
Builder
Singleton
Interface for creating families of related objects
Create complex object from representation
Create a only one globally accessible object
![Page 6: Stephenson College DP 98 1 Design Patterns by Derek Peacock](https://reader036.vdocuments.net/reader036/viewer/2022083009/5697bfd81a28abf838caf2de/html5/thumbnails/6.jpg)
Stephenson College DP 98 6
Structural Patterns
Composite Decorator Façade Proxy
Part-whole hierarchies Attach additional responsibilities Unified interface to subsystems Provide surrogate for object
![Page 7: Stephenson College DP 98 1 Design Patterns by Derek Peacock](https://reader036.vdocuments.net/reader036/viewer/2022083009/5697bfd81a28abf838caf2de/html5/thumbnails/7.jpg)
Stephenson College DP 98 7
Behavioural Patterns
Chain Interpreter
Iterator Memento
Provide a message chain Interpret a language with
grammar Provide access to elements Capture objects internal states