4. Domain Models Flashcards

1
Q

Goals of Domain Models

A

▪ Illustrates noteworthy concepts / terms / objects in an application domain

▪ Source of inspiration for (later) object-oriented design of application logic

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

Domain Models vs. Design Models

A

▪ We create domain models in order to understand the application domain

▪ We create design models in order to express how our solution shall work

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

What is the key challenge in Domain Models?

A

Key challenge is understanding all of the domain’s entities and their relationships,
i.e. not missing anything important

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

What is the key challenge in Design Models?

A

Key challenge is engineering a solution that enables efficient implementation, execution and
maintenance, i.e. creating an efficient design

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

A domain model is typically expressed as a UML class diagram showing

A

▪ Conceptual classes
▪ Associations between conceptual classes
▪ Attributes of conceptual classes

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

Strategies for Identifying Conceptual Classes
in Complex Domain Models

A

Extract noun phrases

Use a category list

Reuse or modify existing models

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

Describing the Application Domain (“Real World”)

A

Use the existing terminology

Exclude irrelevant or out-of-scope aspects

Don’t add concepts to the model if they don’t exist in the application domain

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

Adding Associations to Domain Models

A

An association between two classes indicates the presence of a relevant, memorable relationship between instances of those classes.

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

Using and Interpreting Associations
in Domain Models

A

▪ Domain model associations are bidirectional
▪ Associations should be labeled with verb phrases connecting the class names
▪ Multiple associations can connect classes to symbolize different relationships
▪ An association can be reflexive, i.e. relating instances of the same class

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

Using and Interpreting Associations
in Domain Models

A

▪ Domain model associations are bidirectional
▪ Associations should be labeled with verb phrases connecting the class names
▪ Multiple associations can connect classes to symbolize different relationships
▪ An association can be reflexive, i.e. relating instances of the same class

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

Aggregation

A

▪ Aggregation describes a “contains” relationship

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

Composition

A

Composition describes a “consists of” relationship implying that
▪ A part instance (e.g. Square) belongs to only one composite instance (e.g. Board) at a time
▪ Any part must belong to a composite at any time (“no loose Fingers”)

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

Adding Attributes to Domain Models

A

▪ An attribute is a logical data value of an object.
▪ Attributes are typically primitive data types or trivial data structures
▪ Do not include attributes that are merely technical IDs or foreign keys
▪ Do not include derived attributes, unless their omission would be confusing

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

▪ Associations may have attributes just like classes do

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