Sunteți pe pagina 1din 14

DFD to Structure Charts

Georgia State University DFDs to Structure Charts

First Level Data Flow Diagram


0
Library
System

1 Book Catalog
3

Borrowers List

Georgia State University DFDs to Structure Charts


Functional Decomposition
0
Library
System

1 2 3

2.1 2.2

Georgia State University DFDs to Structure Charts

Structure Chart
Structure Chart Example
Q: Where do the modules come from?

Logical Design
Executive Module
'Update File'
Top because it calls all others
none call it at this level

Module 1 Module 2.. Module n


e.g. Read e.g. Update e.g. Write

Open FIle
Georgia State University DFDs to Structure Charts
Structure Chart
Structure Chart Example
Q: Where do the modules come from?

Physical Design 2

Executive Module
'Update File'
Top because it calls all others
1 none call it at this level 3

Module 1 Module 2.. Module n


e.g. Read e.g. Update e.g. Write

Open FIle
Georgia State University DFDs to Structure Charts

DFD to Structure Charts?


0
Library
System

1 Book Catalog
3
? Structure Chart Example
Q: Where do the modules come from?

Executive Module
'Update File'
Top because it calls all others
2 none call it at this level

Module 1 Module 2.. Module n


e.g. Read e.g. Update e.g. Write

Open FIle
Borrowers List

Georgia State University DFDs to Structure Charts


Why Divide Things Up?

Logical Design
– Simplifies understanding
“divide and conquer”
– Allows parallel development
Physical Design
– Separately compilable modules
one change should not require a complete build

Georgia State University DFDs to Structure Charts

Basic Design Goals

Fitness for purpose


– the system must work, and work correctly
– it should perform all tasks as specified
within the constraints of the resources
Robustness
– the design should be stable against
changes to features such as file or data
structures

Georgia State University DFDs to Structure Charts


Three Design Principles
Simplicity
– the design should be simple as possible,
but no simpler
Separation of Concerns
– the different concepts should be separated
out
Information Hiding
– information about the detailed form of
objects (e.g., data structures) should be
kept local and “visible” to outside modules
Georgia State University DFDs to Structure Charts

Specific Design Guidelines


Cohesion
– the degree modules are sufficient to carry out one, single, well-
defined function. A measure of internal strength. Each module is a
system unto itself.
Coupling
– Module independence preferred to tight interdependence. (e.g. less
is better)
Information Hiding
only the data needed is made available to each module
Modularity
– small self-contained units for maintainability; each module is a
system unto itself

Georgia State University DFDs to Structure Charts


Specific Design Guidelines
(cont’d)
Module Size
– reasonable size
Span of Control
– calling of others: known and limited
Scope of Effect/Control
– clear path of relationships in the hierarchy

Georgia State University DFDs to Structure Charts

Process-oriented Design Activities


Conduct Transformational and/or Transactional
Analysis
– identify all transactions and see if there is common processing
– do while also doing transformational analysis

•Develop Structure Charts

•Design the Physical Database


•Package Program Units

•Write Program Specifications

Georgia State University DFDs to Structure Charts


Partitioning the Data Flow Diagram
Transformation-centered Application
– file handling and manipulation of data is central rather than I/O
– partition DFDs
– transforms data already in files
– by transformations

Transaction-centered Application
– multiple transaction types
– the transaction is central
– e.g. bank transfers in many forms, methods of conveyance
– by wire, phone, voice, person-to-person, etc..

Georgia State University DFDs to Structure Charts

Factoring

is a process of decomposing a DFD into a hierarchy


of program components which eventually become
modules, functions, and control structures
examine each DFD stream and analyze the IPO
structure
places each unbroken strand of processes in DFDs
into its own control structure and creates new
control processes for split strands at the point of
the split

Georgia State University DFDs to Structure Charts


Structure Charts
Are hierarchical to show:
>control and coordination modules
>order and nature of allowable process flows
Understanding Structure Charts
Process/
Or/Selection
Module/
Procedure
Predefined Process
Procedure/Module Library Routine
Call

Control
Data
Loop Flag
Flag

Georgia State University DFDs to Structure Charts

Converting Data Flow Diagrams


to Structure Charts
Processes or groups of processes become
Modules
Basic Issues:
1) not all DFDs are converted
2) generally the lower level DFDs provide sufficient detail
>top level DFDs are too general yet may describe the
control modules
3) several levels along the 'explosion path' require
conversion to STCs

Georgia State University DFDs to Structure Charts


Converting DFDs to STCs
General Steps:
– Obtain a first cut STC
1) identify the set of DFDs to convert to STCs
2) identify the 'boss' (control) module
3) perform transform/transactional analysis on DFDs
– Refine the first cut STC
4)insert data flags and /or control flags as needed
5) determine the cohesiveness of the control module
6) perform coupling/decoupling activities on program
modules
7) evaluate the span of control for program modules

Georgia State University DFDs to Structure Charts

DFDs to STCs: Identifying the 'Boss' Module #1

Select the DFD with the most I/O occurrences


(the largest number of flows in and out)

if no single process with the largest number


exists, choose the area where two or more
processes with the largest number of flows.
Then either:
-- select one of the flows as the 'boss', or
– create a new artificial 'boss' and connect it to the
process with the most flows

Georgia State University DFDs to Structure Charts


DFDs to STCs: Identifying the 'Boss' Module #2

The 'boss' module is the functional equivalent of the


control routine in a structured program
The only purpose of the 'boss' module is to control
calls to the remainder of the STCs. Therefore, it
should not be a module that itself decomposes/
explodes as a peer of other modules at the same
level
may need to choose from the parent DFD
Summary: The 'boss' is a process from an upper
(parent) level from which explosion occurs

Georgia State University DFDs to Structure Charts

Transform and Transactional Analysis

Transform Analysis -->initial rules for DFD conversion


> relates to linear/sequential tasks
>sequential tasks always occur
Transactional Analysis --> provides additional rules for
determining when a procedure needs to call on several
lower level procedures.
> logical OR (selection) situation where values returned by data or
control flags triggers the selection
>case structure analysis with multiple procedures which do not
always get called
Frequently perform both

Georgia State University DFDs to Structure Charts


Rules of Transform Analysis

Basically...
– identify central transform, afferent and
efferent flows
– create a first-cut structure chart
– refine the high-level structure chart
– decompose processes into functions
– refine the STCs iteratively

Georgia State University DFDs to Structure Charts

Steps in Transform Analysis (1)


1) use upper-level parent processes a boss
modules for lower-level converted DFDs

2) insert the boss process at the top and connect it


to the first process it is likely to call

3) begin conversion with the first process


connected to the boss and all others connected
to that first process

Georgia State University DFDs to Structure Charts


Steps in Transform Analysis (2)
4) convert DFD processes to STC procedure
rectangles

5) make a process directly connected to a process


that is already converted into a STC procedure
subordinate to the first/already converted
process

Georgia State University DFDs to Structure Charts

Steps in Transform Analysis (3)


6) convert a data store and entity symbol into a
STC input or output (I/O) procedure that
performs the inputs depicted by the data store
or flows coming from/going to the entities

7) convert data flow arrows into calls that


perform data transmissions

Georgia State University DFDs to Structure Charts


Steps in Transform Analysis (4)
8) make all I/O procedures subordinate to all
other STC procedures connected to them

9) examine the entire set of processes on the


DFDs, converting processes and symbols
connected to them to STC procedures until all
are converted

Georgia State University DFDs to Structure Charts

Steps in Transform Analysis (5)

10) rename modules to indicate how they


occur

11) add data flag symbols to indicate data


objects being passes along the call path

12) Add control flags as needed

Georgia State University DFDs to Structure Charts


Rules for Transaction Analysis

• Basically...
> define transaction types and processing
> develop a structure chart
> further define structure chart details

Georgia State University DFDs to Structure Charts

Transaction Analysis
detect places in a DFD where the data flow leaving or
going to a process do not all occur
– situation where a process depends upon a condition being met
– e.g. a valid order or invalid order cause different processes to be
activated
order Very appropriate for menu-driven
or event-driven applications
Check
order invalid
order

valid get good


order entries

Check
customer

Georgia State University DFDs to Structure Charts

S-ar putea să vă placă și