Event Model
The event model is a visual and structural representation of the domain events within a system, showcasing the flow and interaction of these events. It is derived from an event storming session, capturing the sequence and logic of events that drive the core functionality of the software.
Purpose
- To facilitate understanding of the system’s behaviour from a domain event perspective.
- To identify boundaries and interactions within the system, aiding in the design of bounded contexts in a Domain-Driven Design (DDD) approach.
- To serve as a communication tool among stakeholders, including developers, product managers, and business analysts, ensuring a unified understanding of the system's operation.
Format
The format typically includes a visual diagram with events represented as coloured sticky notes or digital equivalents, linked by arrows indicating the sequence and triggers between events. It might also include:
- Orange Stickies: Represent Domain Events, which are significant happenings in the domain that the business cares about.
- Blue Stickies: Denote Commands, which are actions taken by a user or system that lead to domain events.
- Yellow Stickies: Used for Aggregates, which are collections of entities and value objects that are treated as a single unit.
- Pink Stickies: Indicate Policies, rules that determine what action to take when a particular event occurs.
- Green Stickies: Represent External Systems or Users, showing the actors that interact with the system but are not part of it.
- Lilac Stickies: Used for Read Models, which are projections of data specifically tailored to the needs of the user interface or other output requirements.
- Red Stickies: Highlight Hot Spots or Issues, areas of the model that are contentious, problematic, or require further investigation.
Anti-patterns
- Overcomplication: Introducing unnecessary complexity into the model with too many events or details that do not contribute to understanding the system’s core functionality.
- Siloed Creation: Creating the event model in isolation without involving all relevant stakeholders, leading to a lack of shared understanding or missing perspectives.