Chapter 6. The Life Cycle of a Domain Object Flashcards
___________ mark off the scope within which ________ have to be maintained at every stage of the life cycle.
Aggregates
invariants
DDD, p. 124
Factories and repositories operate on ________, encapsulating the complexity of specific _________.
aggregates
life cycle transitions
DDD, p. 124
With many users consulting and updating different objects in the system, we have to prevent _________ to interdependent objects
simultaneous changes
DDD, p. 126
An aggregate is a ________ of associated objects that we treat as a unit for the purposes of __________
cluster
data changes
DDD, p. 126
Each aggregate has a ________ and a _______.
root
boundary
DDD, p. 126
The __________ defines what is inside the aggregate.
boundary
DDD, p. 126
The root is a ________, _________ contained in the aggregate.
single, specific entity
DDD, p. 126-7
The root is the only member of the aggregate that _________ are allowed to __________.
outside objects
hold reference to
DDD, p, 127
Objects within the boundary may ________ to each other
hold references to
DDD, p. 127
In an aggregate, entities other than the root have a ______ identity.
local
DDD, p. 127
Invariants are ________ rules that must be maintained whenever data ________.
Consistency
Changes
DDD, p. 128
Any rule that _______ aggregates will not be expected to be _______ at all times.
spans
up-to-date
DDD, p. 128
The ______ applied within an aggregate will be _________ with the ________ of each transaction.
invariants
enforced
completion
DDD, p. 128
In the DDD UML models, invariants are indicated by: __________
rules within { }
e.g., {mileage = sum(Position.mileage)}
DDD, p.1 28
The root entity has a _______ identity and is ultimately responsible for checking _________.
global
invariants
DDD, p. 128
The root may hand a _______ of a value object to another object.
copy
DDD, p. 129
Only ______ can be obtained directly with database queries. All other objects must be found by __________.
aggregate roots
Traversal of associations
DDD, p. 129
Objects within the aggregate can hold reference to other __________.
aggregate roots
DDD, p. 129
A ______ operation much remove everything within the aggregate boundary ________.
delete
at once
DDD, p. 129
When a change to ________ with the Aggregate boundary is committed, all __________ of the whole Aggregate ___________.
any object
all invariants
must be satisfied.
DDD, p. 129
Factories provide _______ when the creation of an object or aggregate become complicated or reveals too much of the internal structure.
encapsulation
DDD, p. 136
A program element whose responsibility is the creation of other objects is called a ______.
factory
DDD, p.138
Complex object creation is a responsibility of the ________ layer, yet that task does not belong to the objects that express the _______.
domain
model
DDD, p. 137
One requirement for a good factory is that each creation method is _______ and enforces all ______ of the created object or aggregate.
atomic
invariants
DDD, p. 139