Upload
rogil-jacob-daniel
View
219
Download
0
Embed Size (px)
Citation preview
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 1/21
Data and Actions
• Two aspects of a product – Actions which operate on data
– Data on which actions operate
• The two basic ways of designing a product – Action-oriented design
– Data-oriented design
• Third way – Hybrid methods
– For example, object-oriented design
2
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 3/21
Architectural Design
• Input: Specifications
• Output: Modular decomposition
• Abstraction
4
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 4/21
Detailed Design
• Each module is designed
– Specific algorithms
– Data structures
5
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 5/21
Action-Oriented Design Methods
• Data flow analysis
• When to use it – With most specification methods (Structured
Systems Analysis here)
• Key point: Have detailed action informationfrom DFD
6
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 6/21
How to Perform Data Flow Analysis?
• Data Flow Analysis (DFA) is a design techniquefor achieving modules with high cohesion
• Using the points of highest abstraction of
input and output, the product is decomposedinto three modules: input module, transformmodule and output module
•
This procedure is continued stepwise untileach module performs a single action i.e., thedesign consists of modules with high cohesion
7
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 7/21
Data Flow Analysis
•
Product transforms input into output• Determine
– “Point of highest abstraction of input”
– “Point of highest abstract of output”
8
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 8/21
Data Flow Analysis (contd)
• Decompose into three modules
• Repeat stepwise until each module has high
cohesion
– Minor modifications may be needed to lower
coupling
9
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 9/21
Data Flow Analysis (contd)
• ExampleDesign a product which takes as input a file name, and
returns the number of words in that file (like UNIX wc )
10
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 10/21
Data Flow Analysis Example(contd)• First refinement
• Refine modules of communicational cohesion
11
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 11/21
Data Flow Analysis Example(contd)• Second refinement
• All eight modules have functional cohesion
12
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 12/21
Multiple Input and Output Streams• Point of highest abstraction for each stream
• Continue until each module has high cohesion
– Adjust coupling if needed
13
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 14/21
Transaction Analysis (contd)
• Poor design
– Logical cohesion,
control coupling
•
On the other hand itseems a waste of time
and effort to have five
very similar edit
modules and five verysimilar update modules
15
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 16/21
Data-Oriented Design
• Basic principle
– The structure of a product must conform to the structure of its data
• Three very similar methods
– Warnier – Orr
– Jackson
• Data-oriented design
– Has never been as popular as action-oriented design
– With the rise of OOD, data-oriented design has largely
fallen out of fashion
17
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 17/21
Design of Real-Time Systems
• Difficulties associated with real-time systems
– Inputs come from real world• Software has no control over timing of inputs
– Frequently implemented on distributed software
• Communications implications
• Timing issues
– Problems of synchronization
• Race conditions
• Deadlock (deadly embrace)
• Major difficulty in design of real-time systems
– Determining whether the timing constraints are met by the design
18
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 18/21
Real-Time Design Methods
• Usually, extensions of nonreal-time methods to real-time
• We have limited experience in use of any real-time
methods
• The state-of-the-art is not where we would like it to be
19
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 19/21
Testing during the Design Phase
• Design reviews
– Design must correctly reflect specifications
– Design itself must be correct
–Transaction-driven inspections
20
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 20/21
Metrics for the Design Phase
• The five basic metrics
• Cyclomatic complexity is problematic
– Data complexity is ignored
– Little use with object-oriented paradigm
21
8/13/2019 Structred Design
http://slidepdf.com/reader/full/structred-design 21/21
Challenges of the Design Phase
• Design team should not do too much
– Detailed design should not become code
• Design team should not do too little
– It is essential for the design team to produce a
complete detailed design
• Difficult to find ‘great designers’
22