Post title

written with https://maebert.github.io/themostdangerouswritingapp/#/write?limit=5&type=minutes How to make illegal states impossible with Event Sourcing. The problem is that with event sourcing, you don’t have any rules on what commands can be send out. Well, you have those rules in the domain, but it’s hard to make them explicit in the software. That doesn’t mean that it’s impossible to enforce the domain rules per se. A possible solution is to make your core domain logic, based on the making illegal states impossible and to have your commands validated through this core domain logic. »