Hacker News new | ask | show | jobs
by mason55 2587 days ago
> requires commitment to a handful of golden rules or the entire thing comes crashing down

What are the golden rules?

1 comments

Two bigs ones for me:

- Don't use the read side from the write side.

- Each aggregate should own its data (or more abstractly, the basics of DDD, bounded contexts[0]).

[0]: https://cqrs.nu/Faq

Every state change needs to be reflected as event. Does your function need to save something to DB? Then your functionality should create event which will perform the DB save.