Metaphor

We go to Babur's for a meal on Tuesday and pay by credit card. This might be modeled as an Event with an Event type of PurchasePlaced, a subject of my credit card, and a date of occurrence of Tuesday. If Babur's uses an old manual system and doesn't transmit the transaction until Friday, the transaction would be effective on Friday.

Things happen. Not all of them are interesting, and some may be worth recording but don't provoke a reaction. However, the most interesting things cause a reaction. Many systems need to react to interesting Events. Often you need to know why a system reacts in the way it did.

By funneling inputs to a system into streams of Domain Events, you can keep a record of all the inputs to a system. This helps you organize your processing logic, and it also allows you to keep an audit log of the inputs to the system.

Exercise
Try to locate examples of potential Domain Events in your current Domain.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.76.89