Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach Software Engineering for Students A Programming Approach

web.firat.edu.tr
from web.firat.edu.tr More from this publisher
21.08.2013 Views

SELF-TEST QUESTION 9.4 Discussion 117 9.2 Enhance the structure chart for the patient monitoring software so as to show the logging. 9.4 ● Discussion Why does the data flow method prescribe these steps? There are two main ideas behind the method: 1. the connection between data flows and modularity 2. the idea of an idealized software structure. The first concerns the data flow diagram. Why exactly do we draw a data flow diagram and what is its significance? The answer is that the central aim of this technique is to create a design with the best possible modularity. As described in Chapter 6, the different types of modularity have been analyzed and classified in an attempt to identify which is the best sort of modularity. Perfect modularity would mean that an individual component could be designed, tested, understood and changed when necessary without having to understand anything at all about any other component. The result of the analysis is that out of all the types of relationships, the most independent components are those that communicate with each other only by inputting and outputting serial streams of data – just like the bubbles in a data flow diagram. This type of interaction is termed data coupling. The second idea behind the data flow design method is the observation that many software systems have a similar overall structure. Most software carries out some input, performs some action on the input data and then outputs some information. The most important of these three is the action or transformation on the data. Therefore, in general, the ideal structure for any software is as shown in Figure 9.8. We have seen that the component that does the main processing should be at the top. If we now look at what the input component does, it is likely that it can be broken down into two components, one that inputs some raw data and another that converts it into a more convenient form. The corresponding structure diagram is shown in Figure 9.9. Figure 9.8 Idealized structure for software Process Input Output

118 Chapter 9 ■ Data flow design Input raw data Figure 9.9 Converting raw data for input Process Input Output Convert In general, a piece of software will require that several transformations are carried out on its input data streams and that, after the main processing, several transformations are carried out on its output data streams. We can use an analogy from outside computing. To make wine, we have first to grow vines, pick the grapes, transport them to the farm, and then press them. Only then can we carry out the central task of fermentation. After this we have to pour the wine into bottles, store the bottles for some time, and finally transport them to the shop. Data flow design recognizes this as the archetypal structure for software systems. As we have seen, data flow design concentrates on modeling the flows of data within software. The essential ingredient is any application in which the flows of data are important and can be identified easily. Data flows are significant because nearly every software system involves data flows. In all computer systems information enters the computer as a serial stream of data, simply because time flows serially. Similarly any component within a software system is only capable of carrying out one task at any time. Thus the demands placed on any component are a serial data stream. Therefore data flows constitute a fundamental concept within software. Summary Data flow design proceeds by initially analyzing the data flows and transformations within a software system. The first task is to draw the data flow diagram (bubble diagram), consisting of arcs (data flows) and bubbles (transformations). This diagram can be arrived at by using any one of the following three methods: 1. starting with a single, large bubble, break it up into smaller bubbles 2. start with the output data stream from the software and trace it backwards 3. start with the input data stream to the system and trace it forwards.

SELF-TEST QUESTION<br />

9.4 Discussion 117<br />

9.2 Enhance the structure chart <strong>for</strong> the patient monitoring software so as to<br />

show the logging.<br />

9.4 ● Discussion<br />

Why does the data flow method prescribe these steps? There are two main ideas behind<br />

the method:<br />

1. the connection between data flows and modularity<br />

2. the idea of an idealized software structure.<br />

The first concerns the data flow diagram. Why exactly do we draw a data flow diagram<br />

and what is its significance? The answer is that the central aim of this technique is to create<br />

a design with the best possible modularity. As described in Chapter 6, the different<br />

types of modularity have been analyzed and classified in an attempt to identify which is<br />

the best sort of modularity. Perfect modularity would mean that an individual component<br />

could be designed, tested, understood and changed when necessary without having to<br />

understand anything at all about any other component. The result of the analysis is that<br />

out of all the types of relationships, the most independent components are those that<br />

communicate with each other only by inputting and outputting serial streams of data – just<br />

like the bubbles in a data flow diagram. This type of interaction is termed data coupling.<br />

The second idea behind the data flow design method is the observation that many<br />

software systems have a similar overall structure. Most software carries out some<br />

input, per<strong>for</strong>ms some action on the input data and then outputs some in<strong>for</strong>mation.<br />

The most important of these three is the action or trans<strong>for</strong>mation on the data.<br />

There<strong>for</strong>e, in general, the ideal structure <strong>for</strong> any software is as shown in Figure 9.8.<br />

We have seen that the component that does the main processing should be at the top.<br />

If we now look at what the input component does, it is likely that it can be broken down<br />

into two components, one that inputs some raw data and another that converts it into a<br />

more convenient <strong>for</strong>m. The corresponding structure diagram is shown in Figure 9.9.<br />

Figure 9.8 Idealized structure <strong>for</strong> software<br />

Process<br />

Input Output

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!