Greg Young - CQRS and Event Sourcing - Code on the Beach 2014 https://www.youtube.com/watch?v=JHGkaShoyNs
Notes:
test without getters: 3:28:20 / 6:31:00 don’t care about state if I call ‘Deactivate’ twice, I get an exception that’s the invariant
VERSIONING Event Versioning: 4:24:22 / 6:31:00
- add both methods in aggregate
- upcasting old to new event
When do we need to versionize events? -> when they were written to production dev? just throw away your local event log
Command Versioning: 4:35:10 / 6:31:00 why? backward compatibility for older clients eg. we’ll keep this for 2 months so clients can upgrade in that time
Snapshot versioning
You can always go from one version to the following or back otherwise you have a new event