Overview
An aggregate (also sometimes referred to as an aggregate root) is a way of uniquely identifying something that events can occur to and which we wish to track as part of our business model.

Every aggregate must have an unique identifier, or a system provided unique key (this could be an incremental integer or a GUID).

Aggregates may be organised in a hierarchy or may be completely independent of each other, depending on how the business is organised.

Aggregates should have additional commentary in human-readable form for documentation of the system.

Aggregate definitions can also feed into the web service query formation in a similar way to the way CRUD based systems do this with the hierarchy reflected in the URL.

Implementation
Every aggregate class in the system has a strongly typed marker interface (IAggregate) which also defines what the key of the aggregate is. This key must be provided in the class constructor and be immutable.

Naming convention
The aggregate identifier name should be a singular noun or noun phrase, for example "Vehicle", "User", "Bank Account" etc.



Last edited Jun 13, 2015 at 11:22 AM by Merrion, version 2