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 , which is a measure of the connection between modules in the software architecture, and the coupling strength depends on the complexity of the interface between the modules, the points entering or accessing a module, and data passing 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.
Coupling: Also known as the inter-block connection. 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 module's independence. The coupling between modules depends on the complexity of the interface between modules, the mode of invocation and the information transmitted.
Cohesion: Also known as intra-block contact. A measure of the functional strength of a module, a measure of the degree to which each element within a module is bound to each other. The more cohesive the elements within a module (between the names and the program segments), the higher the cohesion is.
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 its 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.
Love Card (Shenzhen) Management Co., Ltd.
Share every moment of a wonderful
: Icafeyojoy
Weibo:Http://weibo.com/iCafeYOJOY
Official website:www.icafe.im
Cohesion Poly-Low coupling