Design Patterns Library
A reference library for design patterns of all types
Authored by:
Steve Smith
,
et al.
Duration: 15h 1m
Level: Intermediate
Released: 9/10/2010
Duration: 15h 1m
Level: Intermediate
Released: 9/10/2010
Course Rating:
You are currently not signed in. Please sign in to access subscriber-only content.
Currently using: {{getCurrentPlayerName()}} [Change]
| expand all | collapse all | Progress | Duration | |
|---|---|---|---|
Introduction to Design Patterns |
|
00:18:45 | |
|
Introduction
|
|
00:48 | |
|
What They Are
|
|
04:30 | |
|
Design Pattern History
|
|
03:15 | |
|
Pattern Organization and Language
|
|
01:49 | |
|
Why Patterns Matter
|
|
03:09 | |
|
Criticisms
|
|
01:00 | |
|
The PSOD Patterns Library
|
|
02:14 | |
|
Summary
|
|
02:00 | |
Adapter Pattern |
|
00:29:09 | |
|
Introduction
|
|
00:10 | |
|
Motivating Example
|
|
01:19 | |
|
Graphic Example
|
|
00:54 | |
|
Real World Example
|
|
01:19 | |
|
Intent
|
|
00:25 | |
|
Applicability
|
|
01:01 | |
|
Structure
|
|
01:30 | |
|
How It Gets Used
|
|
00:58 | |
|
Collaboration
|
|
00:15 | |
|
Consequences
|
|
01:15 | |
|
Implementation Example
|
|
01:12 | |
|
Demo
|
|
16:01 | |
|
Related Patterns
|
|
01:26 | |
|
References
|
|
00:37 | |
|
Summary
|
|
00:47 | |
Bridge Pattern |
|
00:30:20 | |
|
Introduction
|
|
01:10 | |
|
What Is It?
|
|
02:44 | |
|
Nom Nom Burger
|
|
03:39 | |
|
Inital Problem
|
|
03:14 | |
|
Wrong Solution
|
|
04:11 | |
|
Refactoring to Bridge
|
|
04:19 | |
|
Standard Formatter
|
|
02:17 | |
|
Reverse Formatter
|
|
01:45 | |
|
Fancy Formatter
|
|
00:53 | |
|
What We Did
|
|
02:57 | |
|
Common Usages
|
|
02:00 | |
|
Summary
|
|
01:11 | |
The Builder Pattern |
|
00:44:48 | |
|
Introduction
|
|
02:43 | |
|
Understanding Builder
|
|
05:21 | |
|
Problem 1
|
|
04:57 | |
|
Problem 2
|
|
08:33 | |
|
Problem 3
|
|
10:12 | |
|
What We Built
|
|
07:04 | |
|
Variations
|
|
03:21 | |
|
Summary
|
|
02:37 | |
Chain of Responsibility |
|
00:23:25 | |
|
Introduction
|
|
02:22 | |
|
Traditional Usage
|
|
00:20 | |
|
Motivating Example
|
|
00:40 | |
|
Demo: Expense Report
|
|
03:36 | |
|
Demo: Expense Report w/CoR
|
|
05:38 | |
|
Demo: Non-Traditional Usage
|
|
09:34 | |
|
Summary
|
|
01:15 | |
The Command Pattern |
|
00:23:57 | |
|
Introduction
|
|
00:23 | |
|
Motivating Example
|
|
04:02 | |
|
Intent and Applicability
|
|
02:41 | |
|
Structure and Consequences
|
|
04:04 | |
|
Implementation Example
|
|
10:33 | |
|
Related Patterns
|
|
00:54 | |
|
Summary
|
|
01:20 | |
Composite Pattern |
|
00:29:10 | |
|
Introduction
|
|
01:03 | |
|
Breaking it Down
|
|
01:58 | |
|
Email Example
|
|
02:39 | |
|
Split Gold
|
|
03:52 | |
|
Refactoring 1
|
|
03:42 | |
|
Refactoring 2
|
|
05:33 | |
|
Adding Depth
|
|
03:32 | |
|
Using a Root
|
|
01:20 | |
|
Formal Definition
|
|
01:41 | |
|
When to Use
|
|
02:08 | |
|
Summary
|
|
01:42 | |
Decorator Design Pattern |
|
00:27:04 | |
|
Introduction
|
|
00:45 | |
|
Motivating Example
|
|
02:14 | |
|
Intent
|
|
02:16 | |
|
Applicability
|
|
01:58 | |
|
Structure
|
|
03:47 | |
|
How it Works
|
|
01:50 | |
|
Motivating Example Refactored
|
|
01:01 | |
|
Demo: Overview of the Project
|
|
01:22 | |
|
Demo: Create the Decorator
|
|
02:25 | |
|
Demo: Create the Concrete Decorator
|
|
04:42 | |
|
Demo: Adding more Concrete Decorators
|
|
01:41 | |
|
Consequences
|
|
01:18 | |
|
Related Patterns
|
|
01:03 | |
|
Summary
|
|
00:42 | |
Event Aggregator |
|
00:30:49 | |
|
Introduction
|
|
00:09 | |
|
Motivating Example
|
|
00:51 | |
|
Demo: The Order Application
|
|
00:37 | |
|
Pattern Intent
|
|
01:48 | |
|
Applicability
|
|
01:15 | |
|
Demo: Solving With Standard .NET Events
|
|
05:57 | |
|
Issues with Current Implementation
|
|
02:22 | |
|
Pattern Structure
|
|
00:29 | |
|
Demo: Using Event Aggregator
|
|
07:29 | |
|
Demo: Details of Implementation
|
|
04:39 | |
|
Consequences of the Pattern
|
|
01:18 | |
|
Known Variations
|
|
02:26 | |
|
Related Patterns
|
|
00:57 | |
|
Summary
|
|
00:32 | |
Facade Pattern |
|
00:20:07 | |
|
Introduction
|
|
00:30 | |
|
Intent
|
|
02:14 | |
|
Demo: Motivating Example 1
|
|
03:00 | |
|
Demo: Motivating Example 2
|
|
01:33 | |
|
Structure
|
|
02:12 | |
|
Consequences
|
|
00:53 | |
|
Demo: Facade Pattern Example
|
|
03:15 | |
|
Common Uses
|
|
01:08 | |
|
Demo: Real World Example
|
|
03:27 | |
|
Related Patterns
|
|
00:47 | |
|
Summary
|
|
01:08 | |
Factory Patterns |
|
00:36:14 | |
|
Introduction
|
|
00:32 | |
|
Motivating Example
|
|
01:18 | |
|
Demo: Example
|
|
03:30 | |
|
Intent
|
|
01:30 | |
|
Simple Factory Pattern
|
|
00:54 | |
|
Demo: Simple Factory Pattern
|
|
04:14 | |
|
Simple Factory Pattern Notes
|
|
01:19 | |
|
Factory Method Pattern
|
|
01:47 | |
|
Demo: Factory Method Pattern
|
|
06:02 | |
|
Factory Method Pattern Notes
|
|
01:54 | |
|
Abstract Factory Pattern
|
|
02:53 | |
|
Demo: Abstract Factory Pattern
|
|
04:01 | |
|
Abstract Factory Pattern Notes
|
|
01:21 | |
|
Real World Examples
|
|
03:04 | |
|
Summary
|
|
01:55 | |
Flyweight |
|
00:18:03 | |
|
Introduction
|
|
00:32 | |
|
Intent
|
|
00:55 | |
|
Demo: Motivating Example
|
|
05:39 | |
|
Structure
|
|
02:55 | |
|
Consequence
|
|
01:22 | |
|
Demo: Implementing the Pattern
|
|
02:31 | |
|
Demo: Real World Example
|
|
02:40 | |
|
Related Patterns
|
|
01:08 | |
|
Summary
|
|
00:21 | |
Interpreter Pattern |
|
00:22:28 | |
|
Introduction
|
|
00:39 | |
|
Break Down
|
|
02:18 | |
|
Bar Codes
|
|
01:40 | |
|
How Bar Codes Work
|
|
01:50 | |
|
A Challenge
|
|
01:56 | |
|
Sandwhich Demo Overview
|
|
07:27 | |
|
Sandwhich Demo
|
|
03:32 | |
|
Formal Definition
|
|
01:48 | |
|
Summary
|
|
01:18 | |
Iterator Pattern |
|
00:31:15 | |
|
Introduction
|
|
00:48 | |
|
Pattern Usage
|
|
01:33 | |
|
Without Iterators
|
|
01:09 | |
|
Intent
|
|
00:32 | |
|
Applicability
|
|
02:13 | |
|
Iterators in C#
|
|
02:20 | |
|
Collaboration
|
|
00:38 | |
|
Consequences
|
|
00:44 | |
|
Demo
|
|
17:53 | |
|
Related Patterns
|
|
02:04 | |
|
Summary
|
|
01:21 | |
Lazy Load Pattern |
|
00:52:15 | |
|
Introduction
|
|
00:16 | |
|
Motivating Example
|
|
01:10 | |
|
Intent
|
|
01:07 | |
|
Applicability
|
|
01:36 | |
|
Lazy Initialization
|
|
02:16 | |
|
Demo: Lazy Initialization
|
|
11:16 | |
|
Virtual Proxy
|
|
02:44 | |
|
Demo: Virtual Proxy
|
|
03:54 | |
|
Proxy Consequences
|
|
01:24 | |
|
Value Holder
|
|
01:35 | |
|
Demo: Value Holder
|
|
05:56 | |
|
Ghosts
|
|
01:26 | |
|
Demo: Ghosts
|
|
11:36 | |
|
How It Is Used
|
|
00:56 | |
|
Consequences
|
|
02:42 | |
|
Related Patterns
|
|
00:19 | |
|
References
|
|
00:39 | |
|
Summary
|
|
01:23 | |
Mediator Pattern |
|
00:14:26 | |
|
Introduction
|
|
00:07 | |
|
Motivating Example
|
|
00:20 | |
|
Demo: Motivating Example
|
|
03:13 | |
|
Definition
|
|
02:37 | |
|
Demo: Mediator Pattern
|
|
06:22 | |
|
Advantages and Disadvantages
|
|
01:18 | |
|
Summary
|
|
00:29 | |
Memento |
|
00:21:03 | |
|
Introduction
|
|
01:09 | |
|
Intent
|
|
00:31 | |
|
Applicability
|
|
01:13 | |
|
How It Is Used
|
|
00:46 | |
|
Undo / Redo
|
|
00:57 | |
|
Collaboration
|
|
00:39 | |
|
Consequences
|
|
01:17 | |
|
Operations
|
|
02:16 | |
|
Iterative State
|
|
00:51 | |
|
Demo: WPF Paint
|
|
09:31 | |
|
Related and Summary
|
|
01:53 | |
Model View Presenter (MVP) Pattern |
|
00:41:40 | |
|
Introduction
|
|
01:24 | |
|
Why You Care
|
|
01:19 | |
|
Intent
|
|
02:49 | |
|
A Note on Variations
|
|
02:41 | |
|
Structure and Organization
|
|
05:34 | |
|
Demo: Web Form Example 1
|
|
10:08 | |
|
Demo: Web Form Example 2
|
|
07:52 | |
|
Demo: Windows Forms Example
|
|
03:26 | |
|
Collaboration Among Objects
|
|
02:10 | |
|
Consequences
|
|
01:02 | |
|
Known Uses
|
|
00:52 | |
|
Related Patterns
|
|
00:40 | |
|
Summary
|
|
01:43 | |
Model View ViewModel (MVVM) Pattern |
|
00:43:31 | |
|
Introduction
|
|
01:31 | |
|
History
|
|
02:24 | |
|
Intent
|
|
02:11 | |
|
Structure
|
|
02:01 | |
|
Demo: Creating the Application
|
|
01:33 | |
|
The Model
|
|
01:13 | |
|
Demo: Creating the Model
|
|
04:04 | |
|
The ViewModel
|
|
01:54 | |
|
Demo: Creating the ViewModel
|
|
03:02 | |
|
The View
|
|
01:19 | |
|
Demo: Creating the View
|
|
05:37 | |
|
Binding the View and ViewModel
|
|
03:09 | |
|
Communication Between the View and ViewModel
|
|
00:52 | |
|
Demo: Communicating with Commands
|
|
06:22 | |
|
Collaboration
|
|
02:07 | |
|
Consequences
|
|
01:50 | |
|
Known Uses
|
|
01:01 | |
|
Related Patterns
|
|
00:33 | |
|
Summary
|
|
00:48 | |
Null Object Pattern |
|
00:21:58 | |
|
Introduction
|
|
00:25 | |
|
Motivating Example
|
|
01:05 | |
|
Demo: Example 1
|
|
01:23 | |
|
Demo: Example 2
|
|
03:07 | |
|
Intent
|
|
01:18 | |
|
Applicability
|
|
01:53 | |
|
Also Known As
|
|
00:45 | |
|
Structure
|
|
01:27 | |
|
Demo: Implementation Example
|
|
06:11 | |
|
Consequences
|
|
01:20 | |
|
Notes and Related Patterns
|
|
02:15 | |
|
Summary
|
|
00:49 | |
Observer Pattern |
|
00:28:38 | |
|
Introduction
|
|
01:50 | |
|
Motivating Example
|
|
02:46 | |
|
Introduction to the Observer
|
|
01:43 | |
|
Traditional
|
|
01:08 | |
|
Demo: Traditional
|
|
02:38 | |
|
Consequences
|
|
02:55 | |
|
Events and Delegates
|
|
01:37 | |
|
Demo: Events and Delegates
|
|
02:54 | |
|
IObserver
|
|
03:02 | |
|
Demo: IObserver
|
|
04:05 | |
|
Real World Examples
|
|
02:36 | |
|
Summary
|
|
01:24 | |
The Prototype Pattern |
|
00:31:48 | |
|
Introduction
|
|
03:13 | |
|
Understanding Prototype
|
|
03:51 | |
|
Problem 1
|
|
06:07 | |
|
Problem 2
|
|
04:07 | |
|
Problem 3
|
|
03:47 | |
|
The Prototype Design
|
|
04:11 | |
|
Language Examples
|
|
04:01 | |
|
Summary
|
|
02:31 | |
Proxy Pattern |
|
00:34:32 | |
|
Introduction
|
|
00:08 | |
|
Intent
|
|
00:13 | |
|
Motivating Example
|
|
00:50 | |
|
Applicability
|
|
00:42 | |
|
Structure
|
|
01:25 | |
|
How It Is Used
|
|
00:43 | |
|
Lazy Loading
|
|
01:52 | |
|
Consequences
|
|
01:54 | |
|
Demo: Virtual Proxy
|
|
11:59 | |
|
Demo: Remote Proxy
|
|
06:01 | |
|
Demo: CachedRepository
|
|
06:12 | |
|
Related Patterns
|
|
01:25 | |
|
Summary
|
|
01:08 | |
Repository |
|
00:29:59 | |
|
Introduction
|
|
01:38 | |
|
Intent
|
|
02:03 | |
|
IEmployeeRepository
|
|
07:04 | |
|
Generic IRepository
|
|
01:53 | |
|
Repository at Work
|
|
02:33 | |
|
Implementing a Repository
|
|
05:25 | |
|
Tests and Separation
|
|
04:16 | |
|
Applicability
|
|
01:13 | |
|
Consequences
|
|
01:35 | |
|
Related Patterns
|
|
01:38 | |
|
Summary
|
|
00:41 | |
Singleton |
|
00:31:33 | |
|
Introduction
|
|
00:14 | |
|
Motivating Example
|
|
00:40 | |
|
Intent
|
|
00:25 | |
|
Applicability
|
|
00:33 | |
|
Structure
|
|
00:47 | |
|
Structure (not thread safe)
|
|
01:11 | |
|
How It Is Used
|
|
00:42 | |
|
Structure (thread safe)
|
|
02:05 | |
|
Collaboration
|
|
00:18 | |
|
Consequences
|
|
00:46 | |
|
Single Responsibility
|
|
00:51 | |
|
Implementation Example
|
|
03:54 | |
|
Demo: Adding the Singleton
|
|
16:11 | |
|
Related Patterns
|
|
00:52 | |
|
References
|
|
01:00 | |
|
Summary
|
|
01:04 | |
Service Locator Pattern |
|
00:24:37 | |
|
Introduction
|
|
01:08 | |
|
Motivating Example
|
|
01:13 | |
|
Demo: Simple Version
|
|
01:45 | |
|
Intent
|
|
02:13 | |
|
Structure
|
|
00:51 | |
|
Demo: Improved Version
|
|
03:30 | |
|
Other Providers
|
|
01:31 | |
|
Demo: Advanced Version
|
|
05:59 | |
|
Benefits
|
|
02:07 | |
|
Consequences
|
|
01:04 | |
|
Related Patterns
|
|
01:39 | |
|
Summary
|
|
01:37 | |
State Pattern |
|
00:21:37 | |
|
Introduction
|
|
01:03 | |
|
Motivating Example
|
|
01:59 | |
|
Demo: Simple Version
|
|
01:51 | |
|
Demo: Simple Version Code Review
|
|
01:57 | |
|
Issues with the Simple Approach
|
|
00:50 | |
|
Intent
|
|
01:19 | |
|
Structure
|
|
01:42 | |
|
Demo: Advanced Version Code Review
|
|
02:36 | |
|
States
|
|
02:48 | |
|
State Change
|
|
00:44 | |
|
Demo: Advanced Version
|
|
01:11 | |
|
Benefits
|
|
01:27 | |
|
Known Uses
|
|
01:07 | |
|
Summary
|
|
01:03 | |
Strategy Pattern |
|
00:21:29 | |
|
Introduction
|
|
00:41 | |
|
Demo: Motivating Example
|
|
06:02 | |
|
Intent and Applicability
|
|
02:30 | |
|
The Pattern in UML
|
|
01:47 | |
|
Demo: Implementation Example
|
|
03:03 | |
|
Consequences
|
|
02:11 | |
|
Variation Examples
|
|
04:06 | |
|
Summary
|
|
01:09 | |
Template Method |
|
00:15:18 | |
|
Introduction
|
|
00:07 | |
|
Motivating Example
|
|
01:28 | |
|
Applicability
|
|
00:29 | |
|
Structure
|
|
01:02 | |
|
How It Is Used
|
|
00:34 | |
|
Consequences
|
|
00:33 | |
|
Hooks
|
|
00:19 | |
|
Hollywood Principle
|
|
00:30 | |
|
Implementation Example
|
|
08:23 | |
|
Related Patterns
|
|
00:27 | |
|
References
|
|
00:54 | |
|
Summary
|
|
00:32 | |
Unit of Work |
|
00:20:46 | |
|
Introduction
|
|
02:25 | |
|
Intent
|
|
02:27 | |
|
UoW in ADO.NET
|
|
02:19 | |
|
ObjectContext
|
|
02:33 | |
|
IUnitOfWork
|
|
03:14 | |
|
Implementing IUnitOfWork
|
|
03:23 | |
|
Applicability and Consequences
|
|
01:19 | |
|
Related Patterns
|
|
02:03 | |
|
Summary
|
|
01:03 | |
Visitor Pattern |
|
00:22:57 | |
|
Introduction
|
|
01:05 | |
|
Breaking it Down
|
|
01:38 | |
|
Real Life Example
|
|
02:56 | |
|
Net Worth Without Visitor
|
|
02:06 | |
|
Refactoring to Visitor
|
|
07:51 | |
|
Monthly Income Visitor
|
|
03:17 | |
|
Formal Definition
|
|
02:20 | |
|
Summary
|
|
01:44 | |
Rules Pattern |
|
00:37:29 | |
|
Introduction
|
|
00:54 | |
|
Motivating Example
|
|
00:41 | |
|
Demo: Customer Discounts
|
|
05:01 | |
|
What's the Problem?
|
|
01:44 | |
|
Intent
|
|
01:42 | |
|
Applicability
|
|
00:39 | |
|
Structure
|
|
00:38 | |
|
Demo: Using Rules
|
|
13:31 | |
|
Alternate Structure
|
|
00:38 | |
|
Considerations
|
|
01:13 | |
|
Business Rules Engines
|
|
00:59 | |
|
Practice: Greed Kata
|
|
01:26 | |
|
Demo: Greed Overview
|
|
06:38 | |
|
Summary
|
|
01:45 |
Introduction to Design Patterns