tcs2411 software engineering1 data-flow oriented design “from dfd to structure chart”

22
TCS2411 Software Engineering 1 Data-Flow Oriented Design “From DFD to Structure Chart”

Upload: brooke-york

Post on 03-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 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”

Page 2: TCS2411 Software Engineering1 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

Page 3: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to 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

Page 4: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

TCS2411 Software Engineering 4

Example of Level 1 DFD

ProcessApplication

Member application form

Members

new member record

Page 5: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

TCS2411 Software Engineering 5

Expanded to Level 2

GetForm

CheckForm

AssignCode

FormatRecord

PrepareRecord

Member Members

applicationform

applicationdetails

checkedapplicationdetails

newmemberrecord

newmemberdetails

formattednew memberrecord

Page 6: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 7: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 8: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

Flow Characteristics

Transform flow

Transactionflow

Page 9: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 10: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

Factoring

typical "worker" modules

typical "decision making" modules

direction of increasing decision making

Page 11: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 12: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 13: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

TCS2411 Software Engineering 13

First Level Factoring

GetApplication

ProcessApplication

GenerateNew Member

ProcessMembershipApplication

Page 14: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

TCS2411 Software Engineering 14

Second Level Factoring

CheckApplication

ProcessApplication

GenerateNew Member

ProcessMembershipApplication

GetApplication

GetApplication

Form

FormatNew

Record

GenerateNew

Record

Page 15: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 16: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 17: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

TCS2411 Software Engineering 17

Example of Transaction Flow

readuser

commandinvoke

commandprocessing

user commands

commandtype

action paths

Page 18: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

TCS2411 Software Engineering 18

Transaction Mapping

b d

a c1

qp

transactioncontrol

dispatcher

a

p

b

d

q

receptionpath

Page 19: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 20: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 21: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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

Page 22: TCS2411 Software Engineering1 Data-Flow Oriented Design “From DFD to Structure Chart”

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