week4_SystemDecomposition_Part1
week4_SystemDecomposition_Part1
and Architecture
System Decomposition
Soha Makady
Outline
• Architecture vs. Design
– A Floor Plan Example
• Overview of System Design
• Design Goals → Tradeoffs
• Subsystem Decomposition
A Floor Plan Example
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 3
A Floor Plan Example (Cont’d)
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 4
A Floor Plan Example (Cont’d)
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 5
Version 2 Version 1
Stairs Stairs
Study Bedroom2 Study Dining
Kitchen
Kitchen
Bath
Bath
Master Master
Dining Bedroom2
Bedroom Bedroom
N
Entrance
door
Stairs
Bath
Bedroom2
Study
Kitchen
Hallway
Master
Dining
Bedroom
Version 3
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 6
Version 2 Version 1
Stairs Stairs
Study Bedroom2 Study Dining
Kitchen
Kitchen
Bath
Bath
Master Master
Dining Bedroom2
Bedroom Bedroom
N
Entrance
door
Stairs
Bath
Bedroom2
Study
Kitchen
Hallway
Master
Dining
Bedroom
Version 3
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 7
Version 2 Version 1
Stairs Stairs
Study Bedroom2 Study Dining
Kitchen
Kitchen
Bath
Bath
Master Master
Dining Bedroom2
Bedroom Bedroom
N
Entrance
door
Stairs
Bath
Bedroom2
Study
Kitchen
Hallway
Master
Dining
Bedroom
Version 3
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8
Mapping of Architectural land Software
Engineering Concepts
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 9
Why is Design so Difficult?
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 10
The Scope of System Design
Problem
• Bridge the gap
• between a problem and
an existing system in a
manageable way
System
• How? Design
• Use Divide & Conquer:
1) Identify design goals
2) Model the new system Recall our floor
design as a set of plan example
subsystems
3-8) Address the major
design goals. Existing System
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 11
System Analysis vs. System Design
• Analysis results in the requirements model
described by the following products:
• a set of nonfunctional requirements and
constraints, such as maximum response time,
minimum throughput, reliability, operating
system platform, and so on
• a use case model, describing the system
functionality from the actors’ point of view
• an object model, describing the entities
manipulated by the system
• a sequence diagram for each use case, showing
the sequence of interactions among
objects participating in the use case.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 12
System Analysis vs. System Design
• System design results in the following products:
• design goals, describing the qualities of the
system that developers should optimize
• software architecture, describing the subsystem
decomposition in terms of subsystem
responsibilities, dependencies among
subsystems, subsystem mapping to hardware,
and major policy decisions such as control flow,
access control, and data storage
• boundary use cases, describing the system
configuration, startup, shutdown, and
exception handling issues.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 13
System Design Activities:
From Objects to Subsystems
• System design consists of transforming the
analysis model into the design model, while
considering the non-functional
requirements described in the requirements
analysis document.
• Let us see an example.
• Consider My Trip, a route planning system for
car drivers. Our steps will be as follows:
1. Start with the analysis model My Trip.
2. Identify the design goals of My Trip.
3. Design an initial system decomposition.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 14
System Design Activities:
Starting with the Analysis Model for My Trip
• Using MyTrip, a driver can plan a trip from a
home computer by contacting a trip-planning
service on the Web
• The trip-planning service must support more
than one driver.
• Let us see the PlanTrip use case description.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 15
Starting with the Analysis Model for My Trip
(Cont’d) Analysis
• Use case name: PlanTrip objects?
• Flow of events:
1. The Driver activates her computer and logs into
the trip-planning Web service.
2. The Driver enters constraints for a trip as a
sequence of destinations.
3. Based on a DB of maps, the planning service
computes the shortest way of visiting the
destinations in the order specified.
The result is a sequence of segments binding a
series of crossings and a list of directions.
4. The Driver saves the planned trip by name in
the planning service DB for later retrieval.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 16
Starting with the Analysis Model for My Trip
(Cont’d) Analysis
• Use case name: Execute Trip objects?
• Flow of events:
1. The Driver starts her car and logs into the
onboard route assistant.
2. The Driver specifies the name of the trip to be
executed.
3. The onboard route assistant obtains a list of
destinations, directions, segments, and
crossings from the planning service.
4. Given the current position, the route assistant
provides the driver with the next set of
directions.
5. The driver arrives to destination and shuts
down the route assistant.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 17
Analysis model for the MyTrip route
planning and execution.
RouteAssistant PlanningService
Trip
Location Direction
Destination
Crossing
Segment
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 18
Starting with the Analysis Model for My Trip (Cont’d)
During requirements elicitation, the client specified the
following non-functional requirements for MyTrip:
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 20
Starting with the Analysis Model for My Trip (Cont’d)
During requirements elicitation, the client specified the
following non-functional requirements for MyTrip:
• MyTrip is in contact with the PlanningService via a
wireless modem. Assume that the wireless modem
functions properly at the initial destination.
• Once the trip has started, MyTrip should give correct
directions even if the modem fails to maintain a
connection with the PlanningService.
• MyTrip should minimize connection time to reduce
operation costs.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 21
Identify the Design Goals for My Trip (Cont’d)
• Design goals for MyTrip
• Reliability: MyTrip should be reliable [generalization
of nonfunctional requirement 2].
• Fault Tolerance: MyTrip should be fault tolerant to
loss of connectivity with the routing service
[rephrased nonfunctional requirement 2].
• Security: MyTrip should be secure, i.e., not allow
other drivers or nonauthorized users to access a
driver’s trips [deduced from application domain].
• Modifiability: MyTrip should be modifiable to use
different routing services [anticipation of change by
developers].
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 22
Identify the Subsystems for My Trip (Cont’d)
• Heuristics for grouping objects into subsystems
• Assign objects identified in one use case into the
same subsystem.
• Create a dedicated subsystem for objects used for
moving data among subsystems.
• Minimize the number of associations crossing
subsystem boundaries.
• All objects in the same subsystem should be
functionally related.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 23
Identify the Subsystems for My Trip
(Cont’d)
RouteAssistant PlanningService
Trip
Location Direction
Destination
Crossing
Segment
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 24
Design an initial system decomposition
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 25
Hardware/Software mapping for MyTrip
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 26
Required Readings
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 27