1 / 55

The Traditional Approach To Design

The Traditional Approach To Design. Overview. Traditional approach to designing software Overview of structured models, model development process, related terminology How data flow diagrams are annotated with automation boundary information

corby
Download Presentation

The Traditional Approach To Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Traditional Approach To Design

  2. Overview • Traditional approach to designing software • Overview of structured models, model development process, related terminology • How data flow diagrams are annotated with automation boundary information • How analysis phase models are transformed into design models using system flowcharts, structure charts, and module pseudocode • Integration into other design phase activities • Applying approach to a three-layer architecture

  3. The Structured Approach to Designing the Application Architecture • Application software programs • Designed in conjunction with database and user interface • Hierarchy of modules • A module is a small section of program code that carries out a single function. • A computer program is a set of modules that are complied into a single executable entity. • Top-down approach • DFDs with automation boundaries • System flowcharts, structure charts, pseudocode

  4. The Structured Approach to Designing the Application Architecture • System flowchart • A diagram that describes the overall flow of control b/w computer programs in a system. • Shows the relationships among the various programs, subsystems, and their files or databases • Documents the architectural structure of the overall system. • Pseudocode • Structured programming-like statements that describe the logic of a module. • Designs the internal logic of individual modules.

  5. Structured Design Models

  6. The Automation System Boundary • Partitions data flow diagram processes into manual processes and automated systems • Processes can be inside or outside boundary • Data flows can be inside and outside of boundary • Data flows that cross system boundary represent inputs and outputs of system • Data flows that cross boundaries between programs represent program-to-program communication

  7. DFD with Automation System Boundary

  8. The System Flowchart • Representation of various computer programs, files, databases, and associated manual processes that make up complete system • Frequently constructed during analysis activities • Graphically describes organization of subsystems into automated and manual components • Can show type of transaction processing system • Batch • Real time

  9. Common System Flowchart Symbols

  10. Sample System Flowchart for Payroll System

  11. System Flowchart for RMO

  12. The Structure Chart • Describes functions and subfunctions of each part of system • Shows relationships between modules of a computer program • Simple and direct organization • Each module performs a specific function • Each layer in a program performs specific activities • Single point of entry and exit • Chart is tree-like with root module and branches

  13. A Simple Structure Chart for the Calculate Pay Amounts Module

  14. The Structure Chart • Communicate with each other by passing parameters • Data couple • A diagrammatic representation of the data exchanged between two modules in a structure chart • Flag • A diagrammatic representation of a message passed between two modules

  15. The Structure Chart • Special Symbols • Diamond • Only one subordinate will be called • Curved Line • Subordinates are called repeatedly until terminating condition is met • Predefined modules • Hat • Subordinate module is important logically but code is contained in superior module

  16. Structure Chart Symbols

  17. Structure Chart for Entire Payroll Program

  18. Developing a Structure Chart • Transaction Analysis • The development of a structure chart based on a DFD that describes the processing for several types of transactions • Transform Analysis • The development of a structure chart based on a DFD that describes the input-output data flow

  19. Transform flow Transaction flow Types of Data Flow

  20. incoming flow action path T Create a Structure Chart from a DFD Fragment: Transaction Analysis

  21. Create a Structure Chart from a DFD Fragment: Transaction Analysis

  22. Event-partitioned DFD for the Order-Entry Subsystem

  23. High-level Structure Chart for the Customer Order Program

  24. Create a Structure Chart from a DFD Fragment: Transaction Analysis

  25. Create a Structure Chart from a DFD Fragment: Transaction Analysis

  26. Create a Structure Chart from a DFD Fragment: Transform Analysis • Determine primary information flow • Main stream of data transformed from some input form to output form • Find process that represents most fundamental change from input to output • Redraw DFD with inputs to left and outputs to right process goes in middle • The portion consisting of processes that perform input and editing is called the afferent. • The portion consisting of processes that do actual processing or transformations of data is called the central transform. • The portion consisting of processes that do output is called the efferent. • Generate first draft structure chart based on redrawn data flow

  27. Create a Structure Chart from a DFD Fragment: Transform Analysis

  28. The Create New Order DFD Fragment

  29. Exploded View of Create New Order DFD

  30. Rearranged Create New Order DFD

  31. First Draft of the Structure Chart

  32. Steps to Create a Structure Chart from a DFD Fragment (continued) • Add other modules • Get input data via user-interface screens • Read from and write to data storage • Write output data or reports • Add logic from structured English or decision tables • Make final refinements to structure chart based on quality control concepts

  33. The Structure Chart for the Create New Order Program

  34. Combination of Structure Charts

  35. Evaluating the Quality of a Structure Chart • Module coupling • Measure of how module is connected to other modules in program • Goal is to be loosely coupled • Module cohesion • Measure of internal strength of module • Module performs one defined task • Goal is to be highly cohesive

  36. Examples of Module Cohesion

  37. Module Coupling • In structured design, the decomposition of a program in manageable modules should be done in such a way that the modules are independent as possible from one another. • In structured design programs appearing on a structure chart are evaluated relative to their degree coupling. • Coupling refers to the level of dependency that exists between modules. • Loosely coupled modules are less likely to be dependent on one another.

  38. Module Coupling • Types of coupling: (from best to worst) • Data coupling — two modules are said to be data coupled if their dependency is based on the fact that they communicate by passing of data (e.g., interest rate, term, sum borrowed). • Stamp coupling — two modules are said to be stamp coupled if their communication of data is in the form of an entire data structure or record (e.g., customer-record, order-record). • Control coupling — two modules are said to be control coupled if their dependency is based on the fact that they communicate by passing of control information or flags (e.g., account-number-valid, read-next-record). • Common coupling — modules are said to be common coupled if they refer to the same global data area. • Content coupling — two modules are said to be content coupled (also referred to as hybrid coupled) when one module actually modifies the procedural contents of another module.

  39. Common coupling Find Part Name Remove Stock Previous Stock Part Name New Stock Out of Stock Part Name Exists Non Existent Part Parts Table Error Flag 3

  40. Content Coupling ROUTINE A … … JUMP TO SRCH + 352 … … END ROUTINE A ROUTINE B … … SRCH: MOVE 1 TO REGISTER D … … END ROUTINE B

  41. Module Cohesion • Cohesion refers to the degree to which a module's instructions are functionally related. • Highly cohesive modules contain instructions that collectively work together to solve a specific task. • The goal is to ensure that modules exhibit a high degree of cohesiveness. • Programs that are implemented with highly cohesive modules tend to be easier to understand, modify, and maintain.

  42. Module Cohesion • Types of cohesion (from most desirable to least desirable) • Functional cohesion — are modules whose instruction are related because they collectively work together to accomplish a single well-define function. • e.g., calculate current GPA • Sequential cohesion — are modules whose instructions are related because the output data from one instruction is used as input data to the next instruction. • e.g., format and validate current GPA

  43. Module Cohesion • Communicational cohesion — are modules whose instructions accomplish tasks that utilize the same piece(s) of data. • e.g., calculate current and cumulative GPA • Procedural cohesion — are modules whose instructions accomplish different tasks, yet have been combined because there is a specific order in which the tasks are to be completed. • e.g., calculate cumulative GPA, and print cumulative GPA • Temporal cohesion — are modules whose instructions appear to have been grouped together into a module because of “time”. • e.g., initialize all attributes

  44. Module Cohesion • Logical cohesion — are modules that contain instructions that appear to be related because they fall into the same logical class of functions. • e.g., the called module could open a checking account, open a saving account, or calculate a loan, depending on the message that is send by its calling module • Coincidental cohesion — are modules that contain instructions that have little or no relationship to one another. • e.g., the module could update customer records, calculate loan payments and print exception reports

  45. Module Algorithm Design: Pseudocode • Describes internal logic of software modules • Variation of structured English that is closer to programming code • Syntax should mirror development language • Three types of control statements used in structured programming: • Sequence: sequence of executable statements • Decision: if-then-else logic • Iteration: do-until or do-while

  46. Module Algorithm Design: Pseudocode

  47. Module Algorithm Design: Flowchart

  48. Module Algorithm Design: Nassi-Shneiderman Process Decision Iteration

  49. Do daily Clear Summary Totals Do for each newspaper Clear newspaper Totals Print date Print newspaper Do it for each subscriber update Search for existing subscriber record Update Type New subscription Renewal Change of address Cancellation Address Correct? Null Set subscription length to zero Y N Change Input new address Null Set subscription length Issue refund check Update totals for newspaper Print updated subscriber information Get next subscriber update Print summary totals for newspaper Get next newspaper Print summary totals for all newspaper Module Algorithm Design: Nassi-Shneiderman

  50. Integrating Structured Application Design with Other Design Tasks • Structure chart must be modified or enhanced to integrate design of user interface and database • Are additional modules needed? • Does pseudocode in modules need modification? • Are additional data couples needed to pass data? • Structure charts and system flowcharts must correspond to planned network architecture • Required protocols, capacity, and security

More Related