Using Design Patterns in PHP Without Overdoing It
Design patterns are a tool, not a goal: when to use which pattern in PHP, where they pay off, and the signs that they are creating unnecessary complexity.
Tag
Building applications with PHP: language features, versions and practices, covered in posts, notes, short guides and practical examples. (Page 4/9)
There are 49 posts with this tag.
Design patterns are a tool, not a goal: when to use which pattern in PHP, where they pay off, and the signs that they are creating unnecessary complexity.
A practical look at PHP traits: why they exist and how to share behavior across unrelated classes without the pitfalls of multiple inheritance.
A look at readonly classes, DNF types, and standalone type declarations in PHP 8.2, and their impact on domain modeling.
Embedding meaning into code instead of relying on primitives: why and how to design value objects in PHP, from an Email example to readonly immutability.
Personal notes on why mastering several programming languages is a matter of tool selection, not identity, and what context switching really costs.
PHP 8.1 isn't out yet, but I'm already exploring how the upcoming native enum support and readonly properties will reshape domain modelling.