Introduction to
Design Patterns
Mel Grubb
Developer
@melgrubb | www.melgrubb.com
Traditional Samples
Online Storefront Blogging Engine
Design Patterns
Singleton Factory
Pattern
Observer Strategy
“Design Patterns”
Creational: Behavioral:
• Abstract Factory • Chain of Responsibility
• Builder • Command
• Factory Method Design • Interpreter
Patterns
• Prototype • Iterator
• Singleton • Mediator
Gamma • Memento
Structural: Helm • Observer
• Adapter Johnson • State
• Bridge Vlissides • Strategy
• Composite • Template Method
• Decorator • Visitor
• Façade
• Flyweight
• Proxy
For more information
C# 10 Design Patterns
Kevin Dockx
Singleton
Builder
For more information about
builders in testing scenarios
Creating Maintainable Contexts
for Automated Testing
Mel Grubb
Strategy
Discount Calculator
SALE!
Singleton
Abstraction Encapsulation Inheritance Polymorphism
SRP OCP LSP ISP DIP
Builder
Abstraction Encapsulation Inheritance Polymorphism
SRP OCP LSP ISP DIP
Strategy
Abstraction Encapsulation Inheritance Polymorphism
SRP OCP LSP ISP DIP
Design Patterns
Creational: Behavioral:
• Abstract Factory • Chain of Responsibility
• Builder • Command
• Factory Method Design • Interpreter
Patterns
• Prototype • Iterator
• Singleton • Mediator
Gamma • Memento
Structural: Helm • Observer
• Adapter Johnson • State
• Bridge Vlissides • Strategy
• Composite • Template Method
• Decorator • Visitor
• Façade
• Flyweight
• Proxy
Pattern Fever / Patternitis
An obsession with design patterns, to the exclusion of one’s own
problem-solving skills.
A belief that there must be a pre-existing pattern for every conceivable
problem.
A desire to find a fit for every pattern in every project.
What are design patterns?
Summary
Singleton
Builder
Strategy
Recognizing patterns
Pattern fever (Patternitis)
Nullability