Function-oriented Design

Slides:



Advertisements
Similar presentations
© Andrew IrelandSoftware Design F28SD2 Software Design: Summary Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt University Edinburgh.
Advertisements

System Development Life Cycle (SDLC)
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
IFS310: Week 3 BIS310: Structured Analysis and Design 5/4/2015 Process Modeling and Data Flow Diagrams.
Chapter 7 Structuring System Process Requirements
Using Dataflow Diagrams
1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
Traditional Approach to Design
Chapter 10 The Traditional Approach to Design
Chapter 9: The Traditional Approach to Design Chapter 10 Systems Analysis and Design in a Changing World, 3 rd Edition.
What is Software Design?  Introduction  Software design consists of two components, modular design and packaging.  Modular design is the decomposition.
Copyright Irwin/McGraw-Hill Software Design Prepared by Kevin C. Dittman for Systems Analysis & Design Methods 4ed by J. L. Whitten & L. D. Bentley.
Software Design Deriving a solution which satisfies software requirements.
Data Dictionary What does “Backordered item” mean? What does “New Customer info.” contain? How does the “account receivable report” look like?
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
© Copyright 2011 John Wiley & Sons, Inc.
Chapter 9 Describing Process Specifications and Structured Decisions
Chapter 9 Describing Process Specifications and Structured Decisions Systems Analysis and Design Kendall & Kendall Sixth Edition © 2005 Pearson Prentice.
Chapter 9 Describing Process Specifications and Structured Decisions
Using Dataflow Diagrams
System Design and Analysis
Chapter 7 Using Data Flow Diagrams
Chapter 9 Using Data Flow Diagrams
L ECTURE 9 – PROCESS MODELLING PART 1 Data Flow Diagrams for Process Modelling Multi-level Data Flow Diagrams Logical Vs Physical DFDs Steps to Construct.
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
Chapter 7 Structuring System Process Requirements
6 Systems Analysis and Design in a Changing World, Fourth Edition.
Terms: Test (Case) vs. Test Suite
Chapter 6: The Traditional Approach to Requirements
System Analysis Overview Document functional requirements by creating models Two concepts help identify functional requirements in the traditional approach.
staffs.ac.uk Process Model. staffs.ac.uk Contents Provide definitions Explain the components and representations Introduce a step.
Introduction to Systems Analysis and Design Trisha Cummings.
Data Flow Diagrams (DFDs)
PROCESS MODELING Chapter 8 - Process Modeling
Chapter 1: Data Flow Diagram Structuring System Process Requirements
Data flow diagrams.
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
Chapter 7 Using Data Flow Diagrams
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 15Slide 1 Function-oriented Design u Design with functional units which transform inputs.
© Andrew IrelandSoftware Design F28SD2 Function-oriented Design Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt University Edinburgh.
SAD - DFD Context Diagrams
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
10 ITK261 The traditional approach to design Reading: Chapter 10 Oct 9, 11.
10 The traditional approach to design Hisham Alkhawar.
1 ISA&D7‏/8‏/ ISA&D7‏/8‏/2013 Methodologies of the SDLC Traditional Approach to SDLC Object-Oriented Approach to SDLC CASE Tools.
Elements of Software Analysis and Design - Structured Approaches - Structured Analysis - Functional Oriented Design 10/24/2015ICS 413 – Software Engineering1.
1 Introduction to Software Engineering Lecture 1.
Connecting with Computer Science2 Objectives Learn how software engineering is used to create applications Learn some of the different software engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Chapter 7 Structuring System Process Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Software Engineering Issues Software Engineering Concepts System Specifications Procedural Design Object-Oriented Design System Testing.
Systems Design.  Application Design  User Interface Design  Database Design.
6 Systems Analysis and Design in a Changing World, Fourth Edition.
© 2005 by Prentice Hall Chapter 7 Structuring System Process Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Copyright © 2011 Pearson Education Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall & Kendall Global Edition 9.
Chapter 8: Maintenance and Software Evolution Ronald J. Leach Copyright Ronald J. Leach, 1997, 2009, 2014,
7-1 Chapter 7 Structuring System Process Requirements Modern Systems Analysis and Design Fourth Edition.
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 2 Database Environment.
System Design and Modeling
System Design.
Chapter 2 Database Environment.
Chapter 2 Database Environment Pearson Education © 2009.
Introduction to Systems Analysis and Design
Software Design CMSC 345, Version 1/11.
Chapter 11 Describing Process Specifications and Structured Decisions
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Function-oriented Design
Presentation transcript:

Function-oriented Design Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt University Edinburgh

Outline Motivations Data flow Structuring Detailed design

Motivations Many significant software systems fall into this classification, e.g. transaction processing Many legacy applications were developed using function-oriented design

Function-oriented Design Applicability: Minimal system state Information is typically communicated via parameters or shared memory No temporal aspect to functions, i.e. the result of a function invocation is not dependent upon the function’s earlier invocations Approach: Promotes a top-down functional decomposition style of design

Function-oriented Activities Data flow design: Model data flow through the system as a set of data flow diagrams Structural decomposition: Model the functionality of the system as a hierarchy of sub-functions via the structure chart notation Detailed design: Provide detailed data and functional descriptions, typically supported by the notion of a data dictionary

Data Flow Diagrams Data Flow Diagrams (DFDs) are used to represent the flow of information through a system, i.e. how the system outputs are derived by the functional transformation of input data sources DFDs are used within many design methods and are supported by numerous computer assisted software engineering (CASE) tools No standard notation …

DFD Notation User interaction with the system, i.e. input/output Data store, e.g. database, files, etc System function/operation/process Labelled data flow Note: data flows can be combined logically, i.e. and/or

Example: Regression Testing Testing that code modifications have not regressed the correctness of the system as a whole: “Also as a consequence of the introduction of new bugs, program maintenance requires far more system testing per statement written than any other programming. Theoretically, after each fix one must run the entire batch of test cases previously run against the system, to ensure that it has not been damaged in an obscure way. In practice, such regression testing must indeed approximate this theoretical idea, and it is very costly." Fred Brooks, The Mythical Man Month (p 122)

Example: Regression Testing Consider the following system requirements: A user provides a name for a source code base If valid, then the source code base is retrieved from a database along with its associated regression test suit, which is held in a separate database The source code is executed against the regression tests The test results are compared against the expected results, which are held in another database If actual and expected results differ then a report is generated for the user, else a certificate is generated for the user A log file summarizing the regression testing stored in a database

DFD Example and or Data flow l_file Regression test db s_file r_res Source code db Gen Log s_file r_res report t_file a_res Test case db Gen reports and Run tests Compare r_res id r_file id Gen reports or Validate c_file e_file Expected results db certif Gen certifs Data flow

Exercise: Wanted Persons Consider the following system requirements: A user provides facial features based upon crime reports If valid, then the feature list is used to retrieve a list of relevant feature templates from a database. If the feature list is not valid then an error message is sent to the user The feature template list is used to search for matching offender imagines which are stored within an offender records database Any records for offenders already in prison are then pruned From pruned list, a suspect list is dispatched to the user, while the corresponding records are sent to a “wanted persons” database Exercise: construct a DFD for the requirements above

Exercise: Wanted Persons Consider the following system requirements: A user provides facial features based upon crime reports If valid, then the feature list is used to retrieve a list of relevant feature templates from a database. If the feature list is not valid then an error message is sent to the user The feature template list is used to search for matching offender imagines which are stored within an offender records database Any records for offenders already in prison are then pruned From pruned list, a suspect list is dispatched to the user, while the corresponding records are sent to a “wanted persons” database Exercise: construct a DFD for the requirements above

DFD Example or and feature list features error-msg get feature list validate features or feature list feature template db templates filter templates template list offender image db images match images suspect list images and prison records db records extract suspects records wanted persons db

Hierarchical DFDs As system complexity grows, so will the DFDs Hierarchical, or layered, DFDs provide a way of managing this complexity, i.e. Firstly, a Context Diagram (Level 0) is used to model the system as a single system process together with the environment in which it operates, e.g. users and external data stores Then, Level 1, 2, 3 … DFDs are developed, which model the system’s sub-processes

A Context Diagram (Level 0)

Level 1 DFD 1 2

Level 2 DFD 1.1 1.2 2.1 2.2

Structural Decomposition For a given DFD there will exist choices as to how it is implemented The structure chart notation provides a means of adding more structure to the design Each function (or procedure) is represented as a rectangle A high-level function is represented as a hierarchy of sub-functions Links between sub-functions are labelled with input/output data, i.e. parameters or shared data

Structural Decomposition y x y y A A A A x x x x input output transform Co-ordinate

Structural Decomposition Note that a structure chart shows the relationship between sub-functions, but not the order in which they are invoked Typically a series of structure charts are developed for a given DFD – incrementally expanding level by level, e.g. A A z z x x B C B C x v r t u s D E F

Structural Decomposition B E F G H I J K input process output

Structural Decomposition decision making A C D B E F G H I J K data processing

Structure Chart: First Regression tester id res id res Initialize Test Report Source code id Source code Test cases Expected results Regression results: regression log defect report certificate

Structure Chart: Second Regression tester id r_res id r_res Initialize Test Report id r_res r_res r_res id id res a_res Validate Run tests Compare Logger Generator Source code Test cases Expected results Regression log Defect report Certificate

Structure Chart: Third Regression tester id r_res id r_res Initialize Test Report id r_res r_res r_res id id res a_res Validate Run tests Compare Logger Generator l_file s_file t_file e_file r_file c_file Gen report Gen cert Source code db Test case db Expected results db report cert Regression test db

Detailed Design Detailed design involves getting inside the functional blocks represented with the structure chart notation At this level, Process Description Languages (PDL), i.e. pseudo code A useful intermediate representation is a Data Dictionary (DD) – a structured, but informal, record of data items and functional DDs are useful to designers, programmers as well as during maintenance

Example: Data Dictionary Entity Type Description id string Name of the source code base under test res boolean The result of validating the name of the source code base provided by the user … r_res vector The regression test results, i.e. the actual results vs expected results a_res The actual results obtained by executing the code base against the regression tests test procedure Input: name of source code base Function: co-ordinates the execution of the regression tests and the comparison with the expected results Output: results of regression testing

Sequential vs Concurrent Note that no explicit reference has been made as to how a design is implemented, i.e. sequential vs concurrent DFDs in particular do not impose a control paradigm A DFD representation of a function could be implemented as a: sequence of sub-function invocations or set of communicating processes

Summary Learning outcomes: Recommended reading: Applicability of function-oriented design Data flow and DFDs Structure charts and functional hierarchy Detailed design and data dictionaries Recommended reading: D. Budgen, “Software Design”, Addison-Wesley 2003 I. Sommerville, “Software Engineering”, Addison-Wesley 2007