Transparency Masters for Software Engineering: A

Download Report

Transcript Transparency Masters for Software Engineering: A

Software Engineering: A Practitioner’s Approach, 6/e
Chapter 10b:
Architectural Design
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
For University Use Only
May be reproduced ONLY for student use at the university level
when used in conjunction with Software Engineering: A Practitioner's Approach.
Any other reproduction or use is expressly prohibited.
1
Analyzing Architectural Design
1. Collect scenarios.
2. Elicit requirements, constraints, and environment description.
3. Describe the architectural styles/patterns that have been
chosen to address the scenarios and requirements:
• module view
• process view
• data flow view
4. Evaluate quality attributes by considered each attribute in
isolation.
5. Identify the sensitivity of quality attributes to various
architectural attributes for a specific architectural style.
6. Critique candidate architectures (developed in step 3) using the
sensitivity analysis conducted in step 5.
2
An Architectural Design Method
customer requirements
"four bedrooms, three baths,
lots of glass ..."
architectural design
3
Deriving Program Architecture
Program
Architecture
4
Partitioning the Architecture

“horizontal” and “vertical” partitioning are
required
5
Horizontal Partitioning


define separate branches of the module
hierarchy for each major function
use control modules to coordinate
communication between functions
function 3
function 1
function 2
6
Vertical Partitioning:
Factoring


design so that decision making and work are
stratified
decision making modules should reside at the top
of the architecture
decision-makers
workers
7
Why Partitioned Architecture?




results in software that is easier to test
leads to software that is easier to maintain
results in propagation of fewer side effects
results in software that is easier to extend
8
Structured Design


objective: to derive a program
architecture that is partitioned
approach:



the DFD is mapped into a program
architecture
the PSPEC and STD are used to indicate the
content of each module
notation: structure chart
9
Flow Characteristics
Transform flow
Transaction
flow
10
General Mapping Approach
isolate incoming and outgoing flow
boundaries; for transaction flows, isolate
the transaction center
working from the boundary outward, map
DFD transforms into corresponding modules
add control modules as required
refine the resultant program structure
using effective modularity concepts
11
Transform Mapping
a
b
d
e
h
g
f
i
c
j
data flow model
x1
x2
b
x4
x3
c
a
"Transform" mapping
d
e
f
g
i
h
j
12
Factoring
direction of increasing
decision making
typical "decision
making" modules
typical "worker" modules
13
First Level Factoring
main
program
controller
input
controller
processing
controller
output
controller
14
Second Level Mapping
main
D
C
control
B
A
A
B
C
mapping from the
flow boundary outward
D
15
Transaction Flow
incoming flow
action path
T
16
Transaction Example
fixture
servos
fixture setting
commands
operator
process
operator
commands
report
display
screen
robot control
robot
control
software
assembly
record
in reality, other
commands
would also be shown
17
Refining the Analysis Model
1.
write an English language processing narrative
for the level 01 flow model
2.
apply noun/verb parse to isolate processes, data
items, store and entities
3.
develop level 02 and 03 flow models
4.
create corresponding data dictionary entries
5.
refine flow models as appropriate
... now, we're ready to begin design!
18
Deriving Level 1
Processing narrative for " process operator commands"
noun-verb
parse
Process operator command software reads operator commands from
the cell operator. An error message is displayed for invalid commands.
The command type is determined for valid commands and appropriate
action is taken. When fixture commands are encountered, fixture
status is analyzed and a fixture setting is output to the fixture servos.
When a report is selected, the assembly record file is read and a
report is generated and displayed on the operator display screen.
When robot control switches are selected, control values are sent to
the robot control system.
Process operator command software reads operator commands from
the cell operator. An error message is displayed for invalid commands.
The command type is determined for valid commands and appropriate
action is taken. When fixture commands are encountered, fixture
status is analyzed and a fixture setting is output to the fixture servos.
When a report is selected, the assembly record file is read and a
report is generated and displayed on the operator display screen.
When robot control switches are selected, control values are sent to
the robot control system.
19
Level 1 Data Flow Diagram
Error msg
operator
commands
fixture
servos
status
read
operator
commands
Valid
command
determine
command
type
fixture
analyze
fixture
status
Fixture setting
display
screen
select report
report
control robot
generate
send
control
value
assembly record
robot control
20
Level 2 Data Flow Diagram
error msg
command
produce
error msg
read
command
invalid command
command
validate
command
valid command
fixture setting
status
read
fixture
status
determine
setting
format
setting
raw setting
combined
status
determine
type
robot control
read
record
record
calculate
output
values
send
control
value
start/stop
assembly
record
values
format
report
report
21
Transaction Mapping Principles
isolate the incoming flow path
define each of the action paths by looking for
the "spokes of the wheel"
assess the flow on each action path
define the dispatch and control structure
map each action path flow individually
22
Transaction Mapping
Data flow model
f
e
a
d
b
mapping
t
x1
i
g
program structure
h
l
k
j
m
t
b
a
n
d
x2
e
x4
x3
f
g
l
x3.1
h
m
n
j
i
k
23
Isolate Flow Paths
error msg
command
produce
error msg
read
command
invalid command
command
validate
command
valid command
fixture setting
status
read
fixture
status
determine
setting
format
setting
raw setting
combined
status
determine
type
robot control
read
record
record
calculate
output
values
send
control
value
start/stop
assembly
record
values
format
report
report
24
Map the Flow Model
process
operator
commands
command
input
controller
read
command
validate
command
determine
type
produce
error
message
fixture
status
controller
report
generation
controller
send
control
value
each of the action paths must be expanded further
25
Refining the Structure Chart
process
operator
commands
command
input
controller
read
command
validate
command
read
fixture
status
determine
type
produce
error
message
determine
setting
fixture
status
controller
format
setting
report
generation
controller
read
record
send
control
value
calculate
output
values
format
report
26