Professional Documents
Culture Documents
Packages
Some packages may not be just a conceptual group of things. Instead they are subsystems with behavior and
interfaces. For example, java.util is not a subsystem, it is a package. A PersistenceEngine is a subsystem.
Example:
An information system connects to a use interface
and a persistent storage mechanism.
How does one show subsystems/packages and their
interactions in UML ?
UPC Quantity
Presentation layer
Cash
Cash Balance
Application logic
Record Sales Authorize payments
Storage
Persistent storage
Database
October 23, 2001 Software Design-Layering and Pa 3
ckaging
Three tier architecture (2)
Would you prefer a two-tier architecture? (Obtained by placing application logic into the
presentation layer.)
Presentation POSTApplet
Storage
Database
The application logic needs to be split and isolated into multiple layers.
Domain concepts
Presentation Presentation
Domain
App. logic
Services
Storage
Database
Presentation
Domain
App frameworks
and support libraries A B
A has knowledge
OO DB of B.
Relational
October 23, 2001 DB Software Design-Layering and Pa 13
ckaging
Package diagrams: Coupling
Presentation
Swing Text
Domain
Persistence Jess
Service Access Payments
Inventory
Only partial coupling shown.
October 23, 2001 Software Design-Layering and Pa 14
ckaging
Package diagrams: Alternate Notation
Domain::Sales
Domain::
POSRuleEngine
Technical Services::
UML path name expression: Authorization
<PackageName::<TypeName>
Upward communication:
The Observer pattern: Make the GUI object appear as an
object that implements an interface.
Presentation
ProcessSaleFrame UIFacade
Not a GUI class. Just a
plain object that adds a
level of indirection.
Domain
Register Sale
onPropertyEvent(s,”sales.total”,total)
Domain
Authorization
Sales
Transactions
// Presentation packages
com.foo.nextgen.ui.swing
com.foo.nextgen.ui.text
// Domain packages
com.foo.nextgen.domain.sales
com.foo.nextgen.domain.pricing