Introduction to SOLID
summary
Covers concrete PHP refactorings and trade-offs: controller logic moved into a UserRegistration service then split into storage and welcome-email classes, a duck example showing strategy and decorator patterns not inheritance, and a real OAuth2 token decorator that caches tokens for 48 hours that worked as a storage+API chain. Shows CakePHP filter refactor to a SearchParameters interface, a DatePickerOptions value object, and notes DI containers (Pimple, PHPMailer etc) trade-offs — more code and wiring for easier-to-reason-about, extensible code.
AI-written summary · about
chapters (7)
- 0:00Start
- 2:58READING VS WRITING
- 9:35OPEN FOR EXTENSION
- 16:34SANDWICHES
- 23:08THE OBSERVER PATTERN
- 27:46DESIGN BY CONTRACT
- 56:33OPTIMIZE FOR READING
related talks
34mFrom Good To SOLID: How to Become a Better PHP Developer?
29mSolid Code
36mAn Introduction to OOP, Design Patterns, and TDD
29mLuke Downing :: Lessons from the Laravel Framework
21mSoftware Design Patterns in Laravel 4
57mRefactoring a large legacy PHP Application: a case study
39mClean Coding - 10+ Techniques To Clean Your PHP Code
44mInterface Segregation for PHP
