1 Introduction
1 Introduction
2
Books
3
Syllabus of the lecture
4
Definition of a design pattern
5
Definition of a design pattern
6
Applications of design patterns
7
Good for solving software structural problems
• Abstraction
• Encapsulation
• Information hiding
• Separation of concerns
• Coupling and cohesion
• Separation of interface and implementation
• Single point of reference
• Divide and conquer
8
Solving non-functional software problems
• Changeability
• Interoperability
• Efficiency
• Reliability
• Testability
• Reusability
• Maintenance
• Flexibility
Patterns, Architectures & Frameworks
11
Creational Design Patterns
12
Creational Design Patterns
13
Structural Design Patterns
14
Structural Design Patterns
15
Behavioral Design Patterns
16
Behavioral Design Patterns
17
Behavioral Design Patterns
State: letting an object alter its behavior when its internal state
changes. It appears as if the object changed its class. This pattern can
be observed in a vending machine. Vending machines have states
based on the inventory, amount of currency deposited, the ability to
make change, the item selected, etc.
19
Game Design Patterns
• Sequencing Patterns: time — the artificial world lives and
breathes at its own rthyme. We must invent time and craft the
gears that drive our clock of the game.
Behavioral Patterns
• Bytecode
• Subclass Sandbox
• Type Object
Decoupling Patterns
• Component
• Event Queue
• Service Locator
Optimization Patterns
• Data Locality
• Dirty Flag
• Object Pool
• Spatial Partition