4. process-oriented software design method

Source: Internet
Author: User
Tags processing instruction

The first three blogs are written in three aspects: software engineering, software planning, and software requirements. we have made a good plan and determined the enforceability of the Software. We began to analyze various requirements for the software. With the demand, we can start to truly reach the design stage of our software. In this chapter, summarize related knowledge about software design!

 

Next, let's take a look at this figure, which is about the structure to be summarized in this chapter:

 

 

These five aspects seem unrelated, but they have an inseparable relationship. process-oriented software design: first, we need to understand what we need to do and what goals we have. Second, to complete these tasks, we need to know the necessary basic knowledge, for process-oriented development, the module is the main unit inside, and the most important feature of the module is independence, which is the basis for us to complete other tasks;
4. Understand the attributes of the module. we need to start the design. The first is the outline design, that is, to design the structure of our software-the structural design method; to complete the structural design, and our detailed design, that is, the module design, here we have designed detailed programming skills. 5. Finally, we need to design other components of the software, such as data and file design. For process design, we need to make these things procedural, make it one. Of course, I have not marked the final design document here. This is an important process at any stage. Below, I will summarize these in multiple parts.

 

  I. Task: From a technical point of view, 1. The data structure is actually the design of each of our software data structures; 2. the system structure design defines the relationship between the main components of the system, 3. Process Design converts the structural components into procedural descriptions of the software, making it a mobile program. The outline design and detailed design of the Division from the management stage are the design and refined design of the framework. Here, let's take a look at the software design process:

 

 

Ii. Basis of software design:

1. From top to bottom, gradually refining: This is a method and an idea we designed.

2. Software Structure: includes the module structure and data structure.

3. program structure: indicates the organization of each component of the Program, which is the representation of the software process. Take a look at this figure:

Let me explain the terms:

Depth: Number of presentation layer times, which is 5

Width: indicates the width of any layer of modules. The maximum value is

System width, which is 7

Fan-out: the attached sub-modules of each module. For example, the fan-out value of M is 3.

ABC. The larger the fan-out, the greater the impact on other modules.

Fan in: indicates the entry to the module. For example, the fan in of module T is 4.

 

4. Let's take a look at these structure charts (reflecting the hierarchical call relationships and connections between module calls in the program and Information Transmission ):

 

 

The following figure shows some rules of the module:

 

 

5. modularization: The entire software is divided into several separate commands and addressable parts, called modules, which can be assembled to meet the needs of the entire system.

6. Abstraction: Process abstraction (from system definition to implementation, each step of progress can be seen as a refinement of the software solution abstraction process) and data abstraction (describe the details of a Data Object and define its related operations)

7. Information Hiding: the Implementation Details of each module are concealed for other modules. This is equivalent to the independence of the modules mentioned below.

 

  Iii. Module independence:

 

First, we need to know the three basic attributes of the module: function (implementation), logic (internal), status (conditions and environment used ). Of course, when describing a module, we can also describe it through external features and internal features.

 

Module independence: Each module only involves specific sub-functions, while interfaces with other modules in the software system are simple. Here, we generally use the coupling between modules and the aggregation of modules to measure.

 

Coupling refers to the measurement of the closeness between modules, and cohesion refers to the functional strength of modules. Modules with strong independence should be highly cohesive and low coupling. Let's take a look at the two figures below:

 

1. Relationship between module coupling and independence:

2. Relationship between cohesion and independence of modules:

 

For the specific coupling and cohesion, we can literally understand it. Of course, I also provide the connection here: coupling and cohesion. What we need to do is high cohesion and low coupling!

 

  Iv. Structured Design Methods:

It is through research, analysis and review of the data flow diagram, from the Software Requirement Specification Description to find out the data processing process, and then the underlying data flow chart determines the type of the problem, which is divided into two types: transformation type and transaction type, for analysis. The following two types are introduced:

 

Here I will first describe several module diagrams in the structure diagram:

 

 

(1) transformed system structure: Let's take a look at the three major steps of the transformed system. Finding the process of transforming data is the key. It features an input and an output:

 

 

Here I will give you an example (conversion from a data stream graph to a transform graph ):

 

 

(2) Transaction-type system structure diagram: analyzes the data flow diagram from top to bottom, and gradually decomposes it to establish a complete system diagram. It accepts a task. After the transaction processing center, you can select different modules for operations, that is, one input and multiple outputs. The transaction center is the focus here. Let's take a look at the example diagram:

 

 

Here I will remind you of the analysis process of the transaction system structure diagram:

 

1. Identify the transaction source (which is also the focus); 2. define the appropriate transaction structure; 3. identify various transactions and their defined operations; 4. Pay attention to the use of public modules; 5, establish a transaction processing module for each transaction or a group of closely related transactions; 6. Define all their lower-layer operation modules for the transaction processing module; 7, define all detailed modules for the operation module!

 

After the two designs, we need to describe the modules first: 1. Write a processing instruction for each module; 2, provide an interface description for each module; 3. Determine the global data structure and local data structure; 4. Indicate all design constraints and restrictions; 5. Conduct a summary design review.

 

  

  5. Finally, design software data, files, and processes:

 

 

1. For data design, we only propose its principles here: a. The systematic method for software is also applicable to data; B, determine all data structures and operations applied on each data structure; C. Create a data dictionary and use it to define the design of data and software; D, the decision-making of the underlying data design should be postponed to the later stage of the design process. E. The representation of the data structure is only known for the modules that must directly use the data in the data structure. F, A database for storing valid data structures and related operations should be established; G. software design and programming languages should support the definition and implementation of abstract data types.

 

2. File design: mainly divided into two processes: 1. Logical design (1. Sort out required data elements; 2. analyze the relationship between data; 3. Determine the logical design of the file .) 2. Physical Design (1. Understand the characteristics of a file; 2. Determine the file organization mode, such as sequential files, and directly access the file; 3. Determine the storage medium of the file; 4, determine the file record format; 5. Estimate the access time and storage capacity .)

 

3. Process Design: it is necessary to determine the implementation algorithms of each module and express these algorithms accurately. There are several ways to express it:

 

A. Basic control structure of the program flowchart:

 

Here I will give the program flowchart symbol:

 

 

Of course, an example is provided for your reference:

 

 

B, N-S diagram, also called box diagram, its five basic control structure painting:

 

 

 

C. Problem Analysis diagram (PAD diagram:

 

 

Here is an example for your reference:

 

 

 

Here we will talk about the advantages of the pad chart: (of course, these are all compared, and these three figures can be compared and learned)

1. It must be structured.

2. Clear

3. The program structure is easy to understand and easy to remember

4. It is easy to convert a pad chart into a program in advanced language.

5. You can describe the data structure.

6. Supports Top-Down refinement process

 

Of course, we can also use the table tool such as table determination and pseudo-code to implement these designs. Here we will not describe them one by one.

 

 

Finally, I want to write down the outline of the document.:

 

 

 

In general, it is the general process of Program Design: This is the process of designing a model for software system programs to implement their functions. To put it simply, before building a house, we will draw the drawings and other design schemes!

 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.