- an event-sourced aggregate: Person
- some value objects for a Person: Name, EmailAddress, Address
- some domain events: PersonRegistered, PersonEmailAddressConfirmed, PersonAddressAdded, PersonAddressChanged
- the methods in the Person aggregate which will cause the above events
- we'll try to work test-driven as much as possible
- DDD principles and
- make the model Event sourced
- Golang
- Create
Name
value object and tests (I will not mention tests in the following steps, just create them always ;) - Create simple
Email
value object, only with the "email" value (confirm will come later) - Create
Address
value object with basic fields (CountryCode, PostalCode,City,Street,HouseNumber) - Create
Person
entity (aggregate root) with basic methodRegister
- Create domain event
PersonRegistered
- Follow with methods
RecordedEvents
,recordThat
andapply
- Add new behaviour to the
Email
- "confirm email"- adapt value object and also the aggregate
- create domain event
EmailConfirmed
- Implement
Address
events- AddressAdded
- AddressChanged
- Implement the event store (maybe with PostgreSQL)
- Why do we have "add home address" and "change home address" - why do we have two distinct actions in our domain?
- Visibilities in Golang are not that powerful as in other languages