← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Domain Model Pattern
An object model of the domain that incorporates both behaviour and data — entities with methods expressing domain operations rather than just data containers.
3mo ago Code Quality advanced
Interpreter Pattern
A grammar represented as a class hierarchy — used for search query parsers, expression evaluators, and rule engines.
3mo ago Code Quality advanced
ABC Metric (Assignments, Branches, Conditions) PHP 5.0+ 🧠 4
Code complexity metric using vector magnitude of assignments, branches, and conditions — more expressive than line count.
3mo ago Code Quality advanced
Diagram: Anemic Domain Model (Anti-Pattern) Anemic Domain Model (Anti-Pattern) 🧠 2
Domain objects with only data (getters/setters) and no behaviour — business logic scattered across service classes.
3mo ago Code Quality advanced
Design by Contract
Methods define formal preconditions (what callers must guarantee), postconditions (what the method guarantees), and invariants (what's always true).
3mo ago Code Quality advanced
Flyweight Pattern
A structural pattern that shares common state between many objects rather than storing it in each instance — dramatically reducing memory for large numbers of similar objects.
3mo ago Code Quality advanced
Halstead Maintainability Index 🧠 2
A composite metric (0–100) combining lines of code, cyclomatic complexity, and Halstead volume to estimate maintainability.
3mo ago Code Quality advanced
Object Calisthenics
Nine strict OO coding rules by Jeff Bay that, if followed, force good object-oriented design habits.
3mo ago Code Quality advanced
Open/Closed Principle — PHP Examples
Software entities should be open for extension but closed for modification — add new behaviour without editing existing, tested code.
3mo ago Code Quality advanced
Types of Cohesion
Cohesion grades from Coincidental (worst — random grouping) to Functional (best — single well-defined purpose), guiding module design decisions.
3mo ago Code Quality advanced
Types of Coupling
Coupling grades from Content (worst — direct internal access) to Message (best — pure interface communication), guiding decoupling decisions.
3mo ago Code Quality advanced
Unit of Work
A pattern that tracks all changes made to domain objects during a business transaction and coordinates writing them out as a single atomic database operation.
3mo ago Code Quality advanced
Visitor Pattern PHP 5.0+ 🧠 1
A behavioural pattern that separates an algorithm from the objects it operates on — adding new operations to a class hierarchy without modifying those classes.
3mo ago Code Quality advanced
✓ schema.org compliant