Applying UML & Patterns (3 Ed.) : Logical Architecture & Uml Package Diagrams
Applying UML & Patterns (3 Ed.) : Logical Architecture & Uml Package Diagrams
Applying UML & Patterns (3 Ed.) : Logical Architecture & Uml Package Diagrams
Chapter 13
LOGICAL ARCHITECTURE
&
UML PACKAGE DIAGRAMS
This document may not be used or altered without the express permission of the author.
Dom ain
Business M odel
Modeling *
*
Design Model
package diagram s
UI
of the logical
architecture
(a static view) Dom ain
Tech
Services
: Register : ProductCatalog
Register
ProductCatalog
class diagrams ... 1 1 ...
(a static view)
makeNewSale()
getProductSpec(...)
enterItem (...)
...
...
• Logical architecture
– Shows large-scale organization of SW
classes, grouped by
• Layers (coarse-grained)
• Packages
• Subsystems (finer-grained)
• Layered architecture
– Probably most common generic architecture
– Typically 3 layers
• UI
• Domain
• Tech. Services (DB, logging, etc.)
– Strict version: Layer only calls on layer below
– Relaxed version: Layer may call on multiple
lower layers (common in SW)
1/31/2008 Copyright © 2004 Glenn L. Ray 5
(From Larman 2004)
Fig. 13.2
UI
Domain
Technical Services
Embedded packages
UI Domain
Swing W eb Sales
UI::Swing UI::W eb
Swing W eb
Domain::Sales
Domain
Sales
dependency
window/page transitions M ediation, App Controller)
consolidation/transform ation of disparate
data for presentation
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
Domain
Vertical Layers
Technical Services
Horizontal Partitions
Tiers are often synonymous with layers, but may also indicate physical nodes
3-tier is GUI/Domain/Tech Svcs layers
n-tier is any number, usually more than 3 tiers
1/31/2008 Copyright © 2004 Glenn L. Ray 15
(From Larman 2004)
Fig. 13.7
W orse Better
mixes logical and deployment views a logical view
a logical representation
Dom ain(s)
of the need for data or
services related to these
Dom ain(s)
POS Inventory subdomains, abstracting
implementation
decisions such as a
Technical database.
Services
Technical Services
«component»
Novell
MySQL LDAP Foundation
Inventory
UML notation: A UML component, or replaceable, modular part of the physical system
Swing makeNewSale()
:System enterItem()
: Cashier ProcessSale endSale()
...
Frame
makeNewSale()
: Cashier
enterItem(id, quantity)
makeNewSale()
description, total enterItem()
endSale()
Domain
endSale()
... Register
makeNewSale()
enterItem()
...
Keep in mind that system operations are ‘passed through’ the UI layer to
the domain layer