DEV Community

Discussion on: DDD in action: Armadora - The board game

Collapse
 
ecattez profile image
Edouard CATTEZ

Easy and funny to read !

However, I disagree that errors result in domain events. In fact, if domain events are applying the game rules, a wrong move is just not allowed.

I understand your point of view about keeping track of what went wrong, but I'll rather use exception instead of domain events: what happen if I decide to make only wrong moves ? The domain event history will just be polluted with things prohibited by the rules. What is the domain value ? Doesn't keeping track of what went wrong look more like a need for infra logs ?