Skip to content

Build philosophy

Edward Baitsewe edited this page Nov 9, 2026 · 1 revision

Build philosophy

Slim Killer follows twelve rules in two parts. They come from two PHP courses by Monate Media. The short form is in BUILD_PHILOSOPHY.md, which is the version that counts. Each page below explains one rule in depth: why it exists, where it shows in the code today, and when not to apply it.

Part one: wiring

How components are connected. From PHP 8.5 OOP Mastery (course page). These rules always apply.

  1. Config and the container belong at the entry point
  2. Test behaviours, not layouts
  3. The type system is a security layer
  4. Favour composition over inheritance
  5. Objects either hold state or perform work, rarely both
  6. Read the failing test before reading the code

Part two: modelling

What the components should be, and when that effort is worth it. From Advanced Domain Architecture & Tactical DDD (course page). Rule 7 decides whether the rest apply.

  1. Ceremony must be paid for
  2. The dependency rule points inward
  3. Make illegal states unrepresentable
  4. The aggregate is a consistency boundary
  5. Speak the client's words, exactly
  6. A failure the business can predict is not exceptional

Rule 11 has two companion pages: the Glossary and Writing for clients.

Clone this wiki locally