(Soft engineer video summary 2) Let's refine and refine our knowledge

Source: Internet
Author: User

(Soft engineer video summary 2) Let's refine and refine our knowledge

The conclusion in the previous article is to link the previous big knowledge, but for better understanding, we need to refine the knowledge. Next we will talk about the module structure of the program.

The term "module" is widely used and usually corresponds to a program statement that can be called with a name. The module has four attributes: input and output, logical function, running program, and internal data.

We can use the module structure diagram (MSC) to reflect the hierarchical calls and contact modules in the program and perform physical descriptions.

The main components in the module structure diagram are:

Module: rectangular Representation

Call: it is indicated by an arrow (from the call module to the called module. Divided into loop call and conditional call)

Arc indicates loop call, and diamond indicates conditional call.

Data: Use a small arrow with a circle to represent the data (practical) transmitted from one module to another)

Control Information: Use a small arrow with a black circle to indicate the control information transmitted by one module to another.

When drawing a program structure diagram, we should first modularize it, that is, we should find every module in the program and divide a large and complex software system into easy-to-understand module structures. Then abstract, that is, remove non-essential factors and only consider the essential factors.

When dividing modules, we should pay attention to the relative independence between modules, which produces two standards: coupling between modules and cohesion between modules. We 'd better achieve high cohesion and low coupling.

Coupling: Relationship between modules

Cohesion: the relationship between elements in a module

Coupling types: Data coupling, tag coupling, control coupling, public environment coupling, and content coupling (Principle: Use Data coupling whenever possible, use less control coupling, and limit public coupling, NO content coupling is required .)

The types of cohesion include: Accidental cohesion, logical cohesion, time cohesion, step cohesion, communication cohesion, sequential cohesion, and function cohesion.

The fan-in of a module refers to the number of computer modules that call it.

The number of fan-out modules refers to the number of modules directly under the module.

Depth indicates the level of the module (preferably no more than Layer 7 ).

The width indicates the number of modules in the largest layer.

After learning about the system software we want to implement, we must divide it into modules, clarify the relationship between modules, and have a holistic view so that we can fully consider the problem and hold on to the general direction!

Let's refine some knowledge to better understand ......

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.