5 ms·
Event sourcing made simple. It sure is simple when you don't care about who can do what. > This post has been created by A who is a temp. So it must be approve
by arkh 8y ago
Event sourcing made simple. It sure is simple when you don't care about who can do what.
> This post has been created by A who is a temp. So it must be approved by an editor first. How do I check those things before validating my command? Let's forget about that, but a link (maybe) to the saga pattern and consider it done.
Some things come for free but a lot of easy things become a lot more complex. But this will be hidden to sell the new silver bullet. What's funny is they often use git as an example: remember you rarely use git alone when you want to do things like code review and handling permissions.
- blowski 8y agoYou don’t use event sourcing on its own either. You can use Rails (or Django or Symfony or whatever) to validate the command and add end-user friendly error messages. Then your models should again validate the command as an ‘anti-corruption layer’, this time throwing developer friendly error messages. That said, I completely agree with your assessment. Event sourcing makes simple things a lot harder. It should be used sparingly, only for those situations when the history is genuinely useful.