The software process

Requirements Function-oriented design specification

Design activities Data Architectural Abstract Interface Component Algorithm structure design specification design design design design

Data System Software Interface Component Algorithm structure specification specification specification specification specification

Design products

©Ian Sommerville 2004 Software , 7th edition. Chapter 1 Slide 1 ©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 2

Functional and object-oriented design Functional design process

z For many types of application, object-oriented z Data-flow design design is likely to lead to a more reliable and • Model the data processing in the system using data- maintainable system flow diagrams

z Some applications maintain little state - function- z Structural decomposition oriented design is appropriate • Model how functions are decomposed to sub- functions using graphical structure charts z Standards, methods and CASE tools for functional design are well-established z Detailed design • The entities in the design and their interfaces are z Existing systems must be maintained - described in detail. These may be recorded in a data function-oriented design will be practiced well dictionary and the design expressed using a PDL in the 21st century

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 3 ©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 4

Data flow diagrams DFD notation

z Show how an input data item is functionally z Rounded rectangle - function or transform

transformed by a system into an output data z Rectangle - data store item z Circles - user interactions with the system z Are an integral part of many z Arrows - show direction of data flow and are supported by many CASE systems z keywords and/ or. Used to link data flows z May be translated into either a sequential or parallel design. In a sequential design, processing elements are functions or procedures; in a parallel design, processing elements are tasks or processes

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 5 ©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 6 Order processing DFD Structural decomposition

z Structural decomposition is concerned with developing a model of the design which shows the dynamic structure i.e. function calls

z This is not the same as the static composition structure

z The aim of the should be to derive design units which are highly cohesive and loosely coupled

z In essence, a data flow diagram is converted to a structure chart

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 7 ©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 8

Decomposition guidelines Decomposition guidelines

z For business applications, the top- structure z The aim of the design process is to identify chart may have four functions namely input, loosely coupled, highly cohesive functions. Each process, master-file-update and output function should therefore do one thing and one

z Data validation functions should be subordinate thing only to an input function z Each node in the structure chart should have

z Coordination and control should be the between two and seven subordinates responsibility of functions near the top of the hierarchy

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 9 ©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 10

Process steps Initial structure chart

z Identify system processing transformations Produce • Transformations in the DFD which are concerned design reports with processing rather than input/output activities. entity entity Group under a single function in the structure chart names data entity entity names data z Identify input transformations

• Transformations concerned with reading, validating Get design Collate Generate and formatting inputs. Group under the input function entity names entities report

z Identify output transformations • Transformations concerned with formatting and Design Design Design writing output. Group under the output function name entity report names

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 11 ©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 12 Expanded structure chart Final structure chart

Produce Produce design reports design reports sorted sorted entity names sorted names sorted entity names data names data entity entity data data Get design Collate Generate Get design Collate Generate entity names entities report entity names entities report sorted sorted sorted sorted entity names entity entity entity entity names entity design names data data data design names data name sorted entity Integrated name sorted entity Integrated names data report names data report Get design Get entity Sort entities Get entity Sort entities Produce Print Get design Get entity Sort entities Get entity Sort entities Produce Print name names by name data by type integrated report report name names by name data by type integrated report report Node Link design design entity entity entity data Node data name name names name data report Link report design entity entity report report name names data Design Data Produce Produce database dictionary link report node report

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 13 ©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 1 Slide 14