#Decorator-Pattern
3 notas · última:
Keeping cross-cutting concerns out of application code
Mark Seemann refactors a Polly-coupled API class into application code with zero third-party dependencies, moving fault tolerance into a Decorator at the Composition Root.
Mastering the Decorator Pattern in PHP
The page shows how the Decorator Pattern avoids class explosion in PHP by wrapping a base object with small decorators that add features at runtime. It contrasts this with inheritance-heavy combinations and a large factory switch.
How to isolate complex queries in an object oriented fashion – Alfredo Motta
The article shows how a talent-hunting app can move player search logic out of the active record model and into an `InterestingPlayer` query object, so domain-specific queries stay reusable and `TalentHunter` stays easier to read.
