Event Sourcing in Laravel

I mentioned in my last post that I had helped review a bootstrapping book but actually, I have been fortunate enough to see and comment on quite a few more.

In another post, I will talk about some of things I have learnt becoming an amateur proof-reader, but this one is about Brent’s new book: Event Sourcing in Laravel, which is due to come out in May.

But what exactly is event sourcing? Martin Fowler describes the process as:

[when] all changes to application state are stored as a sequence of events. Not [only] can we query these events, we can also use the event log to reconstruct past states, and as a foundation to automatically adjust the state to cope with retroactive changes.

To further paraphrase some of Brent’s excellent explanations, it helps if you compare it to a CRUD app. In that style of program, you only ever see the result of a series of operations. A final bank balance or the final contents of a “first name” field after a series of edits etc.

Amongst other benefits, with event sourcing, there would be a stream of records representing all stages from beginning to end, and they could be replayed at will, to reach the same result.

Anyway, I’m almost through reading it and much like his others (Laravel Beyond CRUD and Frontline PHP), have learnt a lot about an area I wasn’t familliar with beforehand.

In case this is a new topic for you, too, I’d like to share a couple of recent YouTube links (small print: I got a mention, yay!).

So, let’s start with the videos Freek and Brent have recently done. You can find the first one here and the second was broadcast soon after (that’s the one you really want to listen to if hearing my name is akin to angels singing!)

There’s also the book, of course, and as part of that package, you will be getting 2 hours of video, a PHP package and a demo app - sounds like a bargain, to me!

I’m probably 60% of the way through the reading material and can definitely say that if you are thinking about using event sourcing, and especially if you use PHP, this is a great resource.

Buy it! Soon!

Hi! Did you find this useful or interesting? I have an email list coming soon, but in the meantime, if you ready anything you fancy chatting about, I would love to hear from you. You can contact me here or at stephen ‘at’ logicalmoon.com