TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”
-
Upload
brooke-york -
Category
Documents
-
view
221 -
download
0
Transcript of TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”
TCS2411 Software Engineering 1
Data-Flow Oriented Design
“From DFD to Structure Chart”
TCS2411 Software Engineering 2
Lecture Objectives
• To describe the process of translating the DFDs to structure charts
• To understand the systematic approach in producing the design from the analysis model
• To understand the different types of conversion that can be done in producing the structure chart
TCS2411 Software Engineering 3
Expanding the DFD
• Initial analysis produces the Context Diagram and Level 1 DFD
• In the design phase, the DFD is expanded to lower levels, giving more sub-processes within the original process
• Level 1 Level 2 Level 3 …• Consistency is to be maintained from level to
level
TCS2411 Software Engineering 4
Example of Level 1 DFD
ProcessApplication
Member application form
Members
new member record
TCS2411 Software Engineering 5
Expanded to Level 2
GetForm
CheckForm
AssignCode
FormatRecord
PrepareRecord
Member Members
applicationform
applicationdetails
checkedapplicationdetails
newmemberrecord
newmemberdetails
formattednew memberrecord
TCS2411 Software Engineering 6
Five-Step Process
• The type of information flow is established• Flow boundaries are indicated• The DFD is mapped into program structure• Control hierarchy is defined by factoring• Resultant structure is refined using design
measures and heuristics
TCS2411 Software Engineering 7
Types of Information Flow
• Transform Flow– Information enter at a point, transformed, and
exit at another point– Path: incoming flow central transform outgoing
flow• Transaction Flow
– Single data item, transaction, triggers one of many paths
– Path: incoming flow transaction centre action path
Flow Characteristics
Transform flow
Transactionflow
Transform Mapping
data flow model
"Transform" mapping
ab
c
d e fg h
ij
x1
x2 x3 x4
b c
a
d e f g i
h j
Factoring
typical "worker" modules
typical "decision making" modules
direction of increasing decision making
TCS2411 Software Engineering 11
Transform Mapping
• After transform flow is identified, identify the boundaries of incoming and outgoing flow
• Incoming flow = Afferent flow• Outgoing flow = Efferent flow• In between the boundaries of the two is the
central transform
TCS2411 Software Engineering 12
Example of Boundaries
GetForm
CheckForm
AssignCode
FormatRecord
PrepareRecord
Member Members
applicationform
applicationdetails
checkedapplicationdetails
newmemberrecord
newmemberdetails
formattednew memberrecord
Afferent flow Efferent flowCentraltransform
TCS2411 Software Engineering 13
First Level Factoring
GetApplication
ProcessApplication
GenerateNew Member
ProcessMembershipApplication
TCS2411 Software Engineering 14
Second Level Factoring
CheckApplication
ProcessApplication
GenerateNew Member
ProcessMembershipApplication
GetApplication
GetApplication
Form
FormatNew
Record
GenerateNew
Record
TCS2411 Software Engineering 15
Refinement
• The hierarchy produced is then refined to improve the quality of the design
• Modules could be exploded or imploded• Apply design concepts of module
independence, good cohesion, minimal coupling, and ease of maintenance
TCS2411 Software Engineering 16
Transaction Mapping
• If transaction flow is identified, identify the transaction centre and flow characteristics of each action path
• Similar to transform flow, boundaries are identified for incoming flow and the separate action paths
• Each action path is a transform flow or transaction flow as well
TCS2411 Software Engineering 17
Example of Transaction Flow
readuser
commandinvoke
commandprocessing
user commands
commandtype
action paths
TCS2411 Software Engineering 18
Transaction Mapping
b d
a c1
qp
transactioncontrol
dispatcher
a
p
b
d
q
receptionpath
Transaction Mapping
a
b
t
g
h
d
e
f
i
k
j
l
m
n
Data flow model
x1
b
a
t
x2 x3 x4
d e f g h x3.1 l m n
i j
k
mapping
program structure
Isolate Flow Paths
readcommand
validatecommand
determinetype
readrecord
calculateoutputvalues
formatreport
produceerror msg
readfixturestatus
determinesetting
formatsetting
sendcontrolvalue
command
commandinvalid command
error msg
status
combinedstatus
raw setting
fixture setting
robot control
start/stop
assemblyrecord
record
values
report
valid command
Map the Flow Model
process operator
commands
command input
controller
read command
validate command
produce error
message
determine type
fixture status
controller
report generation controller
send control value
each of the action paths must be expanded further
Refiningprocess operator
commands
command input
controller
read command
validate command
produce error
message
determine type
send control value
read fixture status
determine setting
format setting
read record
calculate output values
format report
fixture status
controller
report generation controller