Design Model This is the set of diagrams that describes the logical design.
This includes software class diagrams, object interaction
diagrams, package diagrams, and so forth.
Software A learning aid that summarizes the key architectural issues
Architecture and their resolution in the design. It is a summary of the
Document outstanding design ideas and their motivation in the
system.
Data Model This includes the database schemas, and the mapping
strategies between object and non-object
representations.
Use-Case A description of the user interface, paths of navigation,
Storyboards, usability models, and so forth.
UI Prototypes
You didnt understand elaboration
when
It is more than "a few" months long for most projects.
It only has one iteration (with rare exceptions for well-
understood problems).
Most requirements were defined before elaboration.
The risky elements and core architecture are not being
tackled.
It does not result in an executable architecture; there is
no production-code programming.
It is considered primarily a requirements or design
phase, preceding an implementation phase in
construction.
You didnt understand elaboration
when (cont.)
There is an attempt to do a full and careful
design before programming.
There is minimal feedback and adaptation; users
are not continually engaged in evaluation and
feedback.
There is no early and realistic testing.
The architecture is speculatively finalized before
programming.
It is considered a step to do the proof-of-concept
programming, rather than programming the
production core executable architecture.
Use Case Ranking
Use cases are ranked for implementation.
Earlyiterations will implement high ranking use cases
and use case scenarios.
For example:
Requirement Comment
(Use Case
Rank or Feature)
High Process Sale Scores high on all rankings.
Logging Pervasive. Hard to add late.
Medium Maintain Users Affects security subdomain.
Low
Domain Modelling
Domain modelling is concerned with
identifying conceptual classes related to
the current iteration.
The initial domain model is created during
the first iteration of the elaboration phase.
The domain model contains the
conceptual classes as well as appropriate
attributes and associations.
Sample UP Artifact Relationships
Domain Model
Design Model
enterItem
(itemID, quantity)
Design
spec = getProductSpec( itemID )
...
An Example Domain Model for the
POS System
concept Sales
Item
or domain LineItem Records-sale-of
object 1
quantity 0..1
1..* *
Stocked-in
association Contained-in
1 1
Sale Store
1 Register
Captured-on
Payment
1
amount
Domain Model Definition
In the UP, the term "Domain Model" means a
representation of real-situation conceptual classes, not
of software objects. The term does not mean a set of
diagrams describing software classes, the domain layer
of a software architecture, or software objects with
responsibilities.
Domain model depicts:
Domain objects (or conceptual classes)
Associations between conceptual classes
Attributes of conceptual classes
It doesnt contain operations
It serves as a visual dictionary of the noteworthy
abstractions, domain vocabulary, and information
content of the domain.
Elements not Suitable
for a Domain Model
A domain model is not a software representation, and some
elements are not appropriate for it:
Software classes (such C# or Java classes)
Elements representing artifacts related to the implementation of the
system (e.g. a database, or a window) unless the domain being
modeled is of software concepts (e.g. a Graphical User Interface library)
Responsibilities or methods
SalesDatabase
oid
software artifact; not part
a v of domain model
Sale
void software class; not part
a date of domain model
time
print()
What are Conceptual Classes?
Sale concept's symbol
representing a conceptual
class.
Intension the definition of sale-1
Sale
A Payment in the Domain Model Payment 1
1 Pays-for
is a concept, but a Payment in date
the Design Model is a software amount
time
class. They are not the same
thing, but the former inspired the
inspires
naming and definition of the
objects
latter.
and
names in
This reduces the representational
gap.
Sale
This is one of the big ideas in Payment
object technology. 1 1 date: Date
Pays-for
amount: Money startTime: Time
UP Design Model
The object-oriented developer has taken inspiration from the real world domain
in creating software classes.
Sales
Cashier Customer Ledger
LineItem
description Worse
price
serial number
itemID
ProductDescription
Item
description Describes Better
price 1 * serial number
itemID
Another Description Example
Assume we have an Flight
airline with a number date Flies-to
Airport
Worse
FlightDescription to
describe the service
of a particular flight
(i.e. its route) Flight
Described-by
FlightDescription Better
date
regardless of whether time * 1 number
name
Associations in Domain Models
We use associations in domain models in order
to:
Denote a relationship that needs to be preserved for
some duration (need-to-remember associations)
Denote associations derived from the Common
Associations List (i.e. common categories of
associations)
Example:
We need to remember what SalesLineItem instances
are associated with a Sale, otherwise it would not be
possible to reconstruct a sale, print a receipt, or
calculate a sale total.
Associations on Domain Models
Be parsimonious about adding too many association
lines. Use the need-to-remember criterion and avoid
visual noise.
During domain modeling an association is not a
statement about :
data flows
foreign key relationships
instance variables, or
object connections
It is more a statement a relationship is meaningful in the
real domain (from a conceptual perspective).
Many such relationships, however, will be implemented
in software as paths of navigation and visibility (both in
Design and Data models).
Association Notation
An association is represented as a line between classes
with a capitalized association name.
The ends of an association may contain a multiplicity
expression indicating the number of instances that may
participate in the association.
association
Records-current
Register Sale
1 1
Direction of Association
The association is inherently bidirectional. This traversal
is purely abstract; it is not a statement about connections
between software entities.
An optional "reading direction arrow" indicates the
direction to read the association name.
-"reading direction arrow"
-it has no meaning except to indicate direction of
reading the association label
-often excluded
Product
Ledger Product Description
Catalog Contains
1 1..*
1 1
1
0..1 Records-
Used-by Describes
accounts-
Sales for * *
LineItem Store
Item
Stocks
1 1
* 1..*
1..*
1
Contained-in Logs- Houses
1 completed 1..*
Sale * Register
Captured-on
0..1 1
1 1 1
Paid-by Is-for Works-on
1 1 1
SalesLineItem Item
0..1 Records-sale-of 1..* Each line item can record a
group of the same kind of items.
For example, 6 tofu packages.
SalesLineItem Item
0..1 Records-sale-of 1..*
/quantity
Cashier Register
Better 1 Uses 1
name number
Product 1 1 1 1 street1
OK id Store
Description street2
manufacturerCode
countryCode cityName
...
Product Store
Description
OK address : Address
itemId : ItemID
Modeling Quantities and Units
Most numeric quantities should not be represented as plain
numbers. Consider price or weight. Saying "the price was 13" or "the
weight was 37" doesn't say much. Euros? Kilograms?
it is common to require knowledge of the unit to support conversions
Payment
not useful
amount : Number
Product
Ledger Product Description
Catalog Contains
1 itemID
1..*
description
1 1
1 price
0..1 Records-
Used-by Describes
accounts-
Sales for * *
LineItem Store
Item
Stocks
quantity 1 name 1
address * 1..*
1..*
1
Contained-in Logs- Houses
1 completed 1..*
Sale * Register
dateTime Captured-on id
0..1 1
/ total
1
1 1
Is-for Works-on
Paid-by
1 1 1
amountTendered id
Domain Models Within the UP
Discipline Artifact Incep. Elab. Const. Trans.
Iteration I1 E1..En C1..Cn T1..T2
s: start, r: refine
System Sequence Diagrams (SSD)
Vision
Use-Case Model
Process Sale
Process
Sale
use 1. Customer
case arrives ...
Cashier
names 2. Cashier
makes new
sale.
3. ... Glossary
parameters and
Require-
Use Case Diagram Use Case Text return value details
ments
system
events
: System
Operation: : Cashier
enterItem() make Supplementary
system NewSale() Specification
Post-conditions: operations
enterItem
-...
(id, quantity)
Design Model
: Register : ProductCatalog : Sale
enterItem
Design (itemID, quantity)
: Cashier :System
makeNewSale
makeNewSale
Simple cash-only Process Sale scenario:
loop [ more items ]
1. Customer arrives at a POS checkout enterItem(itemID, quantity)
with goods and/or services to purchase.
2. Cashier starts a new sale.
3. Cashier enters item identifier. description, total
4. System records sale line item and
presents item description, price, and
running total.
Cashier repeats steps 3-4 until indicates
done. endSale
5. System presents total with taxes
calculated.
6. Cashier tells Customer the total, and total with taxes
asks for payment.
7. Customer pays and System handles
payment. makePayment(amount)
...
Vision
Use-Case Model
Process Sale
Process
Sale
use 1. Customer
case arrives ...
Cashier
names 2. ...
3. Cashier
enters item
identifier. Glossary
Require-
Use Case Diagram Use Case Text
ments
ideas for system
the domain events requirements
the post-
objects, that must be
conditions
attributes, satisfied by
: System
and the software
associations Operation: : Cashier
that undergo enterItem() make Supplementary
changes system NewSale() Specification
Post-conditions: operations
enterItem
-...
(id, quantity)