A domain model is a visual representation of conceptual
classes in a domain
Also called conceptual model
What are the individual concepts in the problem domain?
candidates for our classes
Domain concepts not software objects
Illustrated with a set of class diagrams
operations (method signatures) are defined
Why Create a Domain Model?
can either model the domain in terms of its functions
to get an overview
Or, we can be object-oriented
belong to certain concepts
familiar to this way of viewing the world
representation gap between our conceptual and software models
Need-to-remember: Knowledge of the association needs to be preserved
for some time
Location of a chess piece
Comprehension-only: Used to understand the domain better
Player moves chess pieces
adding too many associations to a domain model
Strategies for Identifying Conceptual Classes
or modify existing models
exist domain models and data models for many common domains
a category list
Noun to concept mapping
Finding Conceptual Classes with Noun Phrase Identification
nouns and noun phrases in textual description of the problem domain and
consider them as candidates
noun-to-class mapping isnt possible
languages are ambiguous
nouns represent attributes
Noun Phrases from Problem Description
A point of sale terminal is a computerized
system used to record sales and handle payments. It is
typically used in a retail store. It includes hardware components,
such as a computer and a bar code scanner, and software to
run the system.
Noun Phrases from High Level Use Case
Use Case: Buy Items
Actors: Buyer, Cashier
Description: A buyer arrives at a checkout with items
cashier records the purchase items.
system presents the running total and line-item details.
cashier collects the payment and enters the payment information.
system updates inventory.
buyer receives the receipt and leaves with the items.
Noun Phrases from
Use Case Flow of Events
Actor Action System
1. B arrives at a checkout
with items to purchase
2. C records identifier from each
(if there are more than
of the same item, the C
enter the quantity)
Determines item price
adds item info into
and price of
item is presented.
Logical data value of an object
The attributes in a domain model should preferably be data
Number, String, Boolean,
Date, Address, Colour,
PIN, ZIP, SSN, ...
conceptual classes with an association, not with an attribute
A Glossary captures terms and definitions
It can also play the role of a Data Dictionary (as in
consistent meaning of terms
risk of misunderstandings
Establish the Glossary early
Vague kind of association
Indicates a whole-part relation
The whole is called composite
The parts are called parts or components
There are two types of aggregation
Cross References in Packages
An element is owned by the package within which it
is defined, but
It may be referenced in other packages
Notation PackageName :: ElementName
A class shown in a foreign package may be modified
with new associations, but must otherwise be unchanged