Cohesion is the measurement of the connection within the module from a functional point of view, and a good cohesive module should do exactly one thing. It describes the functional linkages within the module;
Coupling is a measure of the connection between modules in a software structure, and the coupling strength depends on the complexity of the interface between the modules, the points entering or accessing a module, and the data through the interface.
Cohesion Poly-low coupling, is the concept of software engineering, is the standard for judging the quality of design, mainly object-oriented design, mainly to see whether the cohesion of the class is high, coupling degree is low.
Cohesion is the degree to which each element in a module is tightly bound to each other, and high cohesion is a module in which each element is tightly bound to each other.
The so-called high cohesion refers to a software module is composed of strong correlation code, only responsible for a task, that is, the single principle of responsibility is often said.
Coupling: A measure of the degree of interconnection between different modules within a software structure (coupling is also called block-to-chunk linkage.) A measure of the degree of connection between modules in a software system structure. The tighter the connection between the modules, the stronger the coupling, the less the independence of the module, and the coupling between the modules depends on the complexity of the interface between the modules, the mode of invocation and the information transmitted. For low coupling, the superficial understanding is:
A complete system, between the module and the module, as far as possible to make it independent existence.
In other words, let each module, as far as possible, complete a specific sub-function independently.
The interface between modules and modules is as small and simple as possible.
If the relationship between the two modules is more complex, it is better to consider the further module division first.
This facilitates modification and combination. [1]
Low coupling principle of high polymerization in software development