...
/Reviewing Domain Structures and Components
Reviewing Domain Structures and Components
Learn about detailed domain architectures, including aggregates, entities, events, and event handlers, for various domains within the application.
We'll cover the following...
In The Sample Application chapter, we took a quick look at the outlined domains for the application, as well as a few (but not all) of the commands, events, entities, and other domain objects. Now that we have some knowledge of how the consumer-producer pattern works and how the message broker facilitates that pattern, let’s explore each domain at length to review the pertinent objects within them.
Equipment
The equipment domain is of critical importance. Without a means to manage events that are related to the turnstile units, as well as the cameras in each unit, the application itself doesn’t serve much of a purpose. The following illustration shows the domain architecture for the equipment domain:
The equipment domain is central to the application. Many events are triggered by events that originate from this domain.
Aggregates
The equipment domain leverages two aggregate root objects to manage all interactions within the domain:
Camera: This is used to track basic device information related to the camera and associated maintenance events. It includes the camera ID, the equipment model information, and the station ID.
Turnstile: This is used to track basic device information related to the turnstile and associated maintenance events. It includes ...