Chapter 6. The Life Cycle of a Domain Object Flashcards

1
Q

___________ mark off the scope within which ________ have to be maintained at every stage of the life cycle.

A

Aggregates
invariants

DDD, p. 124

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Factories and repositories operate on ________, encapsulating the complexity of specific _________.

A

aggregates
life cycle transitions

DDD, p. 124

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

With many users consulting and updating different objects in the system, we have to prevent _________ to interdependent objects

A

simultaneous changes

DDD, p. 126

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

An aggregate is a ________ of associated objects that we treat as a unit for the purposes of __________

A

cluster
data changes

DDD, p. 126

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Each aggregate has a ________ and a _______.

A

root
boundary

DDD, p. 126

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The __________ defines what is inside the aggregate.

A

boundary

DDD, p. 126

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The root is a ________, _________ contained in the aggregate.

A

single, specific entity

DDD, p. 126-7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The root is the only member of the aggregate that _________ are allowed to __________.

A

outside objects
hold reference to

DDD, p, 127

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Objects within the boundary may ________ to each other

A

hold references to

DDD, p. 127

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In an aggregate, entities other than the root have a ______ identity.

A

local

DDD, p. 127

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Invariants are ________ rules that must be maintained whenever data ________.

A

Consistency
Changes

DDD, p. 128

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Any rule that _______ aggregates will not be expected to be _______ at all times.

A

spans
up-to-date

DDD, p. 128

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The ______ applied within an aggregate will be _________ with the ________ of each transaction.

A

invariants
enforced
completion

DDD, p. 128

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In the DDD UML models, invariants are indicated by: __________

A

rules within { }
e.g., {mileage = sum(Position.mileage)}

DDD, p.1 28

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The root entity has a _______ identity and is ultimately responsible for checking _________.

A

global
invariants

DDD, p. 128

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The root may hand a _______ of a value object to another object.

A

copy

DDD, p. 129

17
Q

Only ______ can be obtained directly with database queries. All other objects must be found by __________.

A

aggregate roots
Traversal of associations

DDD, p. 129

18
Q

Objects within the aggregate can hold reference to other __________.

A

aggregate roots

DDD, p. 129

19
Q

A ______ operation much remove everything within the aggregate boundary ________.

A

delete
at once

DDD, p. 129

20
Q

When a change to ________ with the Aggregate boundary is committed, all __________ of the whole Aggregate ___________.

A

any object
all invariants
must be satisfied.

DDD, p. 129

21
Q

Factories provide _______ when the creation of an object or aggregate become complicated or reveals too much of the internal structure.

A

encapsulation

DDD, p. 136

22
Q

A program element whose responsibility is the creation of other objects is called a ______.

A

factory

DDD, p.138

23
Q

Complex object creation is a responsibility of the ________ layer, yet that task does not belong to the objects that express the _______.

A

domain
model

DDD, p. 137

24
Q

One requirement for a good factory is that each creation method is _______ and enforces all ______ of the created object or aggregate.

A

atomic
invariants

DDD, p. 139

25
Q

One requirement for a good factory is that the factory should be abstracted to the _______, rather than the concrete class(es) created

A

type desired

DDD, p. 139

26
Q

If you need to add elements inside a preexisting aggregate, you might create factor method here…

A

on the root of the aggregate.

DDD, p. 139

27
Q

A factory should be attached only to an object that has a _______ relationship with the product.

A

close natural

DDD, p. 141

28
Q

A factory method can be put on an object that is closely involved in spawning another object, although it doesn’t _____ the product once it is created.

A

own

DDD, p. 139

29
Q

Gamma (1995) talks about three special purpose creation patterns….

A

Factory Method
Abstract Factory
Builder

DDD, p. 139

30
Q

When there doesn’t seem to be a natural host for a implementation, we must create a ______ factory object or service.

A

dedicated

DDD, p.