• only works if everyone commits • takes a lot more time • is only for experienced developers • goes well with event sourcing • doesn’t work without event sourcing • • is about documentation • is a new concept • is about strategy • is about tactics • is only for developers • is a hype • is for every project • is all-or-nothing • is about language • DDD... (true / false)
were contacted • etc. Event Decision Hot spot Member was invoiced 14 days passed Invoice was paid Reminder was sent Including Sundays? Visitor arrived Has voting privileges Seated non-voting Seated voting How do we know?
• Create empty command handlers • Add comments for events No implementation! No framework! Get something started One service per command Use and adapt the event storm model Group project files by context
public function __construct(Uuid $id, Name $name, EmailAddress $emailAddress) { $this->id = $id; $this->name = $name; $this->emailAddress = $emailAddress; } public function getId(): Uuid { /**/ } public function getName(): Name { /**/ } public function setName(Name $name): Attendee { /**/ } public function getEmailAddress(): EmailAddress { /**/ } public function setEmailAddress(EmailAddress $emailAddress): Attendee { $this->emailAddress = $emailAddress; return $this; } }
• Entity: Life cycle! • Domain Service: Cross-concern process! • Repository: Complete set of a type of entity! No database! No browser! No generic subdomain! Focus on the domain Write unit tests Use and adapt the event storm model Group project files by context
to your favorite framework, • Or to Plain-Old-C/PHP/Fortran/? • Make something work from UI to DB and back Database Browser End to end tests Group project files by concept