Skip to content

Aggregates

Michi Gysel edited this page Dec 17, 2015 · 8 revisions

An aggregate is a pattern from Domain Driven Design.

An Aggregate is a group of associated objects which are considered as one unit with regard to data changes.

Domain-Driven Design Quickly

Martin Fowler writes:

Aggregates are the basic element of transfer of data storage - you request to load or save whole aggregates. Transactions should not cross aggregate boundaries.

DDD_Aggregate

We map aggregates to Consistency Constraints.

Sample file

{  
   "aggregates":[  
      {  
         "name":"BookingAggregate",
         "nanoentities":[  
            "Booking.bookingDate",
            "Booking.paymentDate",
            "Booking.totalPrice",
            "Booking.bookingState"
         ]
      }
   ]
}

JSON Schema to validate the file: ServiceCutter/JSON_Schemas/2_userReps.json

Online Validator: www.jsonschemavalidator.net

Relevant coupling criteria