• No results found

Software Design. Design (I) Software Design Data Design. Relationships between the Analysis Model and the Design Model

N/A
N/A
Protected

Academic year: 2021

Share "Software Design. Design (I) Software Design Data Design. Relationships between the Analysis Model and the Design Model"

Copied!
11
0
0

Loading.... (view fulltext now)

Full text

(1)

CS213 © Peter Lo 2005 1

Design (I)

Design (I)

Peter Lo CS213 © Peter Lo 2005 2

Software Design

Software Design

„ Software Design is a process through which

requirements are translated into a representation of software.

Relationships between the Analysis

Relationships between the Analysis

Model and the Design Model

Model and the Design Model

Entity-Relationship Diagram Data Flow Diagram State-Transition Diagram Data Dictionary

Process Specification (PSPEC)

Control Specification (CSPEC)

Data Object Description procedural

design interface design architectural design data design

Software Design

Software Design

Data Design

Data Design

„ Data design is the first (and sometimes the most important) of the four design activities that are conducted in software engineering.

„ Transforms the information domain model created during analysis into the data structures that will be required to implement the software.

„ The data objects and relationships defined in the Entity-Relationship Diagram (ERD) and the detailed data content depicted in the Data Dictionary provide the basis for the data design activity.

(2)

CS213 © Peter Lo 2005 5

Software Design

Software Design

Architectural Design

Architectural Design

„ Defines the relationship among major structural

elements of the program.

„ This design representation (the modular

framework of a computer program) can be derived from the analysis model and the interaction of subsystems within the analysis model.

CS213 © Peter Lo 2005 6

Software Design

Software Design

Interface Design

Interface Design

„ Describes how the software communicates within

itself, to systems that inter-operates with it, and with humans who use it.

„ The Data and Control Flow Diagrams provide

the information required for interface design.

Software Design

Software Design

Procedural Design

Procedural Design

„ Transforms structural elements of the program

architecture into a procedural description of software components.

„ Information obtained from the Process and

Control Specifications and the State Transition Diagrams serve as a basis for procedural design.

Data Design

Data Design

„ Data design itself is defined and summarized by Wasserman:

‹ The primary activity during data design is to select

logical representations of data objects (data structures) identified during the requirements definition and specification phase.

‹ The selection process may include algorithmic analysis

of alternative structures in order to determine the most efficient design or may simply involve the use of a set of modules (a “package”) that provide the desired operations upon some representation of an object.

(3)

CS213 © Peter Lo 2005 9

Data Design Principles (Wasserman)

Data Design Principles (Wasserman)

1. The systematic analysis principles applied to function and behavior should also be applied to data

2. All data structures and the operations to be performed on each should be identified.

3. A data dictionary should be established and used to define both data and program design.

4. Low-level data design decisions should be deferred until late in the design process. (Top-down Approach)

5. The representation of data structure should be known only to those modules that must make direct use of the data contained within the structure. (Information Hiding)

6. A library of useful data structures and the operations that may be applied to them should be developed. (Reusability)

7. A software design and programming language should support the specification and realization of abstract data types.

CS213 © Peter Lo 2005 10

Architectural Design

Architectural Design

„ To develop a modular program structure and represent the control relationships between modules

„ Combines program structure and data structure, thus defining interfaces that will enable data to flow throughout the program

„ Data flow-oriented design is an architectural design method that allows a convenient transition from the analysis model to a design description of program structure

Data Flow Oriented Design

Data Flow Oriented Design

„ The transition from information flow (such as DFD) to structure is typically accomplished as a five step process: 1. The type of information flow (either transform or

transaction flow) is established 2. Flow boundaries are indicated

3. The DFD is mapped into program structure 4. Control hierarchy is defined by Factoring 5. The resultant structure is defined using design

measures and heuristics

Data Flow Types: Transform Flow

Data Flow Types: Transform Flow

„ Information must enter and exit software in an “external world” form;

‹ E.g. data being typed on a keyboard, pictures on a

computer graphics display.

„ Externalized data coming must be converted into an internal form for processing.

„ Information entering the system along paths that transform external data into an internal form are called Incoming Flow.

„ At the kernel of the software, a transition occurs: Incoming data are passed through a transform center and begin to move along paths that lead out of the software. Data moving along these paths are called Outgoing Flow.

(4)

CS213 © Peter Lo 2005 13

Data Flow Types: Transform Flow

Data Flow Types: Transform Flow

„ A segment or part of a data flow diagram demonstrates these characteristics, transform flow is present.

„ Transform Analysis will then be applied to change this DFD into an

architectural representation

CS213 © Peter Lo 2005 14

Data Flow Types: Transaction Flow

Data Flow Types: Transaction Flow

„ Information flow is characterized by a single data item, called a transaction, that triggers other data flow along one of many paths.

„ The transaction is evaluated and, based on its value, flow along one of many action paths is initiated.

„ The hub of information flow from which many action paths flow from is called a transaction

Data Flow Types: Transaction Flow

Data Flow Types: Transaction Flow

Transform Mapping

Transform Mapping

„ Transform mapping is a set of design steps that allows a DFD with transform flow characteristics to be mapped into a predefined template for program structure.

(5)

CS213 © Peter Lo 2005 17

Transform Mapping (Design Steps)

Transform Mapping (Design Steps)

1. Review the fundamental system model 2. Review and refine DFD for the software

3. Determine whether the DFD has transform or transaction

flow characteristics

4. Isolate the transform center by specifying incoming and

outgoing flow boundaries

5. Perform "First-Level Factoring" 6. Perform "Second-Level Factoring"

7. Refine the "First-Cut" program structure using design

heuristics for improved software quality

CS213 © Peter Lo 2005 18

Transform Mapping (Step 1)

Transform Mapping (Step 1)

„ Review the fundamental system model.

Transform Mapping (Step 2)

Transform Mapping (Step 2)

„ Review and refine data flow diagrams for the software.

Transform Mapping (Step 3)

Transform Mapping (Step 3)

„ Determine whether the DFD has transform or transaction flow characteristics.

(6)

CS213 © Peter Lo 2005 21

Transform Mapping (Step 4)

Transform Mapping (Step 4)

„ Isolate the transform center by specifying incoming and outgoing flow boundaries.

‹Incoming and outgoing flow boundaries are open to interpretation, and different designers may select slightly different points in the flow as boundary locations

CS213 © Peter Lo 2005 22

Transform Mapping (Step 4)

Transform Mapping (Step 4)

Transform Mapping (Step 5)

Transform Mapping (Step 5)

„ Perform “first-level” factoring.

‹Factoring results in a program structure in which top-level modules perform decision making and low-level modules perform most input, computational and output work.

‹Middle-level modules perform some control and do moderate amounts of work.

Transform Mapping (Step 5)

(7)

CS213 © Peter Lo 2005 25

Transform Mapping (Step 6)

Transform Mapping (Step 6)

„ Perform “second-level” factoring.

‹Individual transforms (bubbles) of a DFD are now mapped into appropriate modules within the program structure.

‹In the next step, modules can be combined or split apart to achieve a good level of cohesion and coupling within the program structure.

CS213 © Peter Lo 2005 26

Transform Mapping (Step 6)

Transform Mapping (Step 6)

Transform Mapping (Step 6)

Transform Mapping (Step 6)

Transform Mapping (Step 7)

Transform Mapping (Step 7)

„ Refine the first iteration program structure using design heuristics for improved software quality.

‹Modules can be exploded or imploded to produce sensible factoring, good cohesion, minimal coupling, and most importantly, a structure that can be implemented

(8)

CS213 © Peter Lo 2005 29

Transform Mapping (Step 7)

Transform Mapping (Step 7)

CS213 © Peter Lo 2005 30

Transaction Mapping

Transaction Mapping

„ Transform mapping is a set of design steps that allows a DFD with transaction flow characteristics to be mapped into a predefined template for

program structure.

Transaction Mapping (Design Step)

Transaction Mapping (Design Step)

1. Review the fundamental system model 2. Review and refine DFD for the software

3. Determine whether the DFD has transform or transaction

flow characteristics

4. Identify the Transaction center and the flow of

characteristics along each of the action paths

5. Map the DFD in a program structure amendable to

transaction processing

6. Factor and refine the transaction structure of each action

path

7. Refine the "First-Cut" program structure using design

heuristic for improved software quality

Transaction Mapping (Step 1)

Transaction Mapping (Step 1)

(9)

CS213 © Peter Lo 2005 33

Transaction Mapping (Step 2)

Transaction Mapping (Step 2)

„ Review and refine DFD for the software

CS213 © Peter Lo 2005 34

Transaction Mapping (Step 3)

Transaction Mapping (Step 3)

„ Determine whether the DFD has transform or transaction flow characteristics.

Transaction Mapping (Step 4)

Transaction Mapping (Step 4)

„ Identify the Transaction center and the flow of characteristics along each of the action paths.

‹The transaction center lies at the origin of a number of action paths that flow radically from it.

Transaction Mapping (Step 4)

(10)

CS213 © Peter Lo 2005 37

Transaction Mapping (Step 5)

Transaction Mapping (Step 5)

„ Map the DFD in a program structure amendable to transaction processing.

‹Transaction flow is mapped into a program structure that contains an incoming branch and a dispatch branch. Structure for the incoming branch is developed in the same way as transform mapping.

‹The structure of the dispatch branch contains a dispatcher module that controls all subordinate action modules.

CS213 © Peter Lo 2005 38

Transaction Mapping (Step 5)

Transaction Mapping (Step 5)

Transaction Mapping (Step 5)

Transaction Mapping (Step 5)

Transaction Mapping (Step 6)

Transaction Mapping (Step 6)

„ Factor and refine the transaction structure of each action path.

‹Each action path of the data flow diagram has its own information flow characteristics. ‹In other words, it is possible for an action path

to demonstrate transform flow characteristics, and therefore necessitate transform mapping.

(11)

CS213 © Peter Lo 2005 41

Transaction Mapping (Step 7)

Transaction Mapping (Step 7)

„ Refine the first iteration program structure using design heuristics for improved software quality.

CS213 © Peter Lo 2005 42

Transaction Mapping (Step 7)

References

Related documents

As an increasing number of equipment vendors offer SFP-based modules for Gigabit Ethernet and Fiber Channel switches and network interface adapters, the LC connector has become the

In Arabidopsis, auxin treatment represses strongly genes involved in the glucosinolate pathway (the pathway is highlighted in green on Figure 1-3).. Therefore, it

The aim of this study was to investigate predictors for achieving protein and energy requirements on the fourth day of admission in undernourished hospitalized patients.. Methods:

One possible approach, found in the Obama campaign plan, would be to establish a purchasing exchange at the federal level. Ensuring that health insurance is uniformly available

Therefore, the objectives of this study are (1) to estimate the RE and erosivity density (ED) in the Poyang Lake basin using the daily rainfall data from 1960–2012 and (2)

The transformed function passes through the point (x,  10). Determine the value of x. a) Sketch the graphs of the functions on the same grid. c) State the range and the equation

The purpose of this review is to describe: how the literature has defined DLD in adolescents, and if this differs when the population being studied is incarcerated; what methods

We simultaneously eval- uated both the main and interactive effects of plant neighbors and insect herbivory on rosette growth and seed reproduction in the year of flowering