Demonstrating the Power of Strategies
Course Content
0 / 50 completedHow This Course Is Structured
Understanding the Role of Design Patterns
The First Attempt to Decorate a Class
Motivation for the Decorator Pattern
Summary
The Downfall of the Subclassing Decorator
Using Object Composition Instead of Inheritance
Advancing from Decorator to Adapter Pattern
Implementing a Transparent Adapter
Limiting the Role of Adapters
Towards a Heavyweight Adapter
Implementing the Strategy Pattern
Understanding the Need for Flexibility
Implementing Strategies via the Interface
Augmenting the Strategy Interface
Demonstrating the Power of Strategies
Implementing Strategies with Strategies
Strategies in the .NET Framework
Summary
Understanding the Limitations of the Abstract Factory
Understanding the Need for Abstract Factory Pattern
Attempting to Overcome the Limitations
Implementing Concrete Factories
Summary
Completing the Concrete Factories
Demonstrating the Concrete Factories
From Abstract Factory to Factory Method
Holding State Behind a Factory Method
Fixing Parameters with Factory Method
Confining Propagation of Change with Factory Methods
Currying Factory Methods
Summary
Understanding Limitations of Factories
Replacing Factory with Builder
Adding Validation to the Builder
Handling Variation and Optional Components
Building a Factory Method
Understanding the Need for a Consistent Builder
Building a Graph of Objects
Designing a Consistent Builder
Adding Alternatives to a Consistent Builder
Shameless Immutability in Builders
Designing an Immutable Builder
Designing a Fluent Builder
Understanding Multitudes of Objects
Inventing the Composite Element
Understanding Recursive Nature of Composites
Combining Composite and Factory Methods
Reversing Composites Representing One Element as Many
Combining Composite and Abstract Factory