The concept of coupling is clear to everyone. Its strength directly affects software maintenance and upgrade. Coupling is called coupling.
One of our software projectsThe basic principle is high cohesion and low coupling.
The Coupling Degree between modules refers to the dependency between modules, including the control relationship, call relationship, and data transmission relationship. The more inter-module connections, the stronger the coupling, and the poorer the independence.
Reducing the Coupling Degree between modules can reduce the impact between modules, prevent the Water Wave Effect Caused by modifications to a module, and ensure smooth system design.
The coupling modes between two modules can be divided into seven types. The order of their coupling degree is as follows:Non-direct coupling, data coupling, tag coupling, control coupling, external coupling, public coupling, and content coupling.
Cohesion refers to the closeness between various internal elements. The module cohesion types can be divided into seven types,
The order of cohesion is as follows:Accidental cohesion, logical cohesion, instantaneous cohesion, process cohesion, communication cohesion, sequential cohesion, and functional cohesion.
The concept of coupling degree is quite lacking. It is easy to fall into a mixed environment.
PushingArticle:
Influence of coupling measurementCodeQuality
Http://www-128.ibm.com/developerworks/cn/java/j-perf07304/index.html