DEV Community

Discussion on: Event Sourcing: What it is and why it's awesome

Collapse
 
barryosull profile image
Barry O Sullivan

Actually, I just remembered, a friend of mine, @lyonscf , has written a really solid ES example of a Shopping Cart.

github.com/boundedcontext/bounded-...

It's in PHP and written using a framework we co-authored. Look at "Aggregate.php" in a Aggregate/Cart to see the events being applied, and the invariants (synonym for constraint) being checked/enforced. Hope you find it helpful!

Collapse
 
tmikaeld profile image
Mikael D

This is exactly what I was hoping for and more, thanks! I'll look through it and test it out.