~/talk

Unbreakable Domain Models

Talkat PHP UK Conference 2014 · 2014-02-21..02-22· [php, frontend-architecture]
slides:none on file

Data Mappers like Doctrine2 combine with Value Objects (Email, Money), Entities and collection-style Repositories to keep invariants: constructors require essential state, operations encapsulate lifecycle changes, and the Specification pattern exposes an S satisfiedBy plus optional asSql representation. Repositories implement a findSatisfying method that either filters objects in memory or dispatches the specification SQL, and queries get tested by comparing the in-memory filter result to the SQL result on a copy of production data. Used successfully across tenants with DI.

AI-written summary · about

  1. 0:00Start
  2. 6:33Use objects as consistency boundaries
  3. 11:53Violates Single Responsibility Principle
  4. 15:43Encapsulate state and behavior with Value Objects
  5. 24:58Order 3 times to become a premium custom
  6. 28:17Different rules apply for different tenants.
  7. 32:37Use specifications to encapsulate rules about object selection
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.