Design Patterns Workshop
summary
Covers SOLID then walks through eight common Gang of Four patterns with live PHP coding and concrete examples: a cache interface with APC and Memcached, decorator vs traits implementations, mediator used as a Gateway for value objects, abstract Factory vs Builder for object creation, chain of responsibility, strategy, observer, and why the Singleton is an anti-pattern (hard to test). Workshop format runs through code, diagrams and Q&A so the payoff is runnable patterns and caveats not theory.
AI-written summary · about
chapters (15)
- 0:00Start
- 0:13Design patterns are often expressed in diagrams, not code.
- 1:52Developing a SOLID understanding
- 9:50Meyer's open/closed principle
- 18:04Program to an interface, not an implementation.
- 19:33Design by contract is a philosophy which states that designers should define formal, precise and verifiable interface specifications for software components.
- 21:24ALL instances of Cache should be substitutable for one another!
- 27:23The smaller your interface, the better your application.
- 34:09Type hinting
- 34:51By relying on abstractions, we free our application from dependency hell.
- 37:38The decorator pattern Composition over inheritance.
- 38:05PHP doesn't support multiple inheritance!
- 43:46Traits introduced in PHP 5.4
- 47:21Magic methods are not "part of the interface."
- 58:51The Mediator Pattern is great for loose coupling, because it discourages modules from talking to one another.
related talks
58mImmutable Patterns of System Design; From Monolith to Agentic AI
40mBarely Enough Design
57mDesign Patterns: Head-first vs Emergent
24mA Few Good Design Patterns
50mDesign Patterns: The most common misconceptions
21mThe Timeless Value of Design Patterns Across 30 Years — What Modern Scrum Developers Relearned from the GoF Patterns
38mRefactoring Fat Models with Patterns
36mBuilding Strong Code Through Patterns
