Coupling and cohesion

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(See Also)
Line 21: Line 21:
 
*Read {{Ref|1}} at [http://www.research.ibm.com/journal/sj/132/ibmsj1302C.pdf IBM Research]
 
*Read {{Ref|1}} at [http://www.research.ibm.com/journal/sj/132/ibmsj1302C.pdf IBM Research]
 
==See Also==
 
==See Also==
*Stable dependencies principle
+
*[[Stable dependencies principle]]

Revision as of 07:38, 5 October 2008

First described in [1], coupling and cohesion refers to structuring a set of "highly cohesive classes and to maintain loose coupling between those classes. High-cohesion means well-structured classes and loose coupling means more flexible, extensible software" [2]

Contents

Coupling

From [1]:

The fewer and simpler the connections between modules, the easier it is to understand each module without reference to other modules. Minimizing connections between modules also minimizes the paths along which changes and errors can propagate into other parts of the system, thus eliminating disastrous "ripple" effects, where changes in one part cause errors in another, necessitating additional changes elsewhere, giving rise to new errors, etc.

Cohesion

From [1]:

Coupling is reduced when the relationships among elements not in the same module are minimized. There are two ways of achieving this - minimizing the relationships among modules and maximizing relationships among elements in the same module. In practice, both ways are used.
The second method is [in effect, increasing cohesion between elements]. "Element" in this sense means any form of a "piece" of the module, such as a statement, a segment, or a "subfunction". Binding is the measure of cohesiveness of a module. The objective here is to reduce coupling by striving for high binding.

References

  1. ^W. Stevens, G. Myers, L. Constantine, "Structured Design", IBM Systems Journal, 13 (2), 115-139, 1974.
  2. ^ http://javaboutique.internet.com/tutorials/coupcoh/

External Links

See Also

Personal tools