Home > News > Content

Coupling High To Low

Coupling means that there is a close interaction between the input and output of two or more circuit elements or electrical networks, and the energy is transmitted from one side to the other by interaction.

Simply put, the degree of coupling between objects in software engineering is the dependency between objects. The main issue that guides the use and maintenance of objects is the multiple dependencies between objects. The higher the coupling between objects, the higher the maintenance cost. So the object should be designed so that the coupling between the class and the component is minimized.

There is coupling between hardware and software, as well as the coupling between the various modules of the software.

Coupling is a measure of the interrelationship between the modules in the program structure. It depends on the complexity of the interface between the various modules, the way the module is called and what information through the interface.

Coupling can be divided into the following, the coupling between them is high to low as follows:

(1) content coupling. Such a coupling is called a content coupling when a module directly modifies or operates data from another module, or when one module does not pass through the normal entry into another module. The content coupling is the highest degree of coupling and should be avoided.

(2) public coupling. Two or more modules together refer to a global data item, which is called a common coupling. In a structure with a large number of common couplings, it is very difficult to determine which module assigns a specific value to the global variable.

(3) external coupling. A group of modules accesses the same global simple variable instead of the same global data structure, and instead of passing the global variable through the parameter table, it is called an external coupling.

(4) control coupling. A module through the interface to another module to pass a control signal, the module receiving the signal according to the signal value of the appropriate action, this coupling is called the control coupling.

(5) tag coupling. If a module A passes a common parameter to the two modules B and C through the interface, there is a mark coupling between the modules B and C.

(6) data coupling. The data is passed between the modules via parameters, which are called data coupling. Data coupling is the lowest of a coupling form, the system generally exists in this type of coupling, because in order to complete some meaningful functions, often need to be some of the module's output data as another module of input data

(7) non-direct coupling. There is no direct relationship between the two modules, the relationship between them is entirely through the main module control and call to achieve.

Summary: Coupling is an important factor that affects the complexity of the software and the quality of the design. We should use the following principles in the design: if there is a coupling between the modules, try to use data coupling, less control coupling, limit the range of common coupling, Avoid using content coupling.

Cohesion and coupling

The cohesive marks the degree to which each element of a module is combined with each other, which is a natural extension of the concept of information concealment and localization. Cohesion is from the functional point of view to measure the link within the module, a good cohesive module should do just one thing. It describes the functional links within the module. Coupling is a measure of the interconnection between modules in the software architecture. The coupling strength depends on the complexity of the inter-module interface, the access to or access to a module point, and the data through the interface. The program is about low coupling, high cohesion. Is the same module within the various elements to be highly close, but the interdependence between the various modules have to be so close.

Cohesion and coupling are closely related, and high coupling modules with other modules mean low cohesion, while high cohesive modules mean that the module is low coupling with other modules. In the software design, should strive to achieve high cohesion, low coupling.

Vibration mode coupling

The coupling of the vibration modes refers to the vibration input of the two vibration modes in a certain vibration mode (or in a generalized coordinate direction), resulting in a response in another vibration mode (or another generalized coordinate direction) The

The coupling separation is called decoupling. The purpose of the decoupling is to make the vibrations of each of the degrees of freedom (ie, the vibration modes) relatively independent or separate, so that the vibration of the poor degree of freedom to take independent measures without affecting the direction of other degrees of freedom on the performance. When the degree of freedom is independent, the frequency of resonance may be smaller than the existence of coupling, especially in the direction of large excitation energy to ensure decoupling.