Well , coupling or dependency is the degree to which each program module relies on each one of the other modules.
Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa. The software quality metrics of coupling and cohesion were invented by Larry Constantine, original developer of Structured Design was also an early proponent of these concepts
Coupling can be "low" (also "loose" and "weak") or "high" (also "tight" and "strong"). Low coupling refers to a relationship in which one module interacts with another module through a stable interface and does not need to be concerned with the other module's internal implementation (see Information Hiding). With low coupling, a change in one module will not require a change in the implementation of another module. Low coupling is often a sign of a well-structured computer system, and when combined with high cohesion, supports the general goals of high readability and maintainability.
Systems that do not exhibit low coupling might experience the following developmental difficulties:
* Change in one module forces a ripple of changes in other modules.
* Modules are difficult to understand in isolation.
* Modules are difficult to reuse or test because dependent modules must be included.
The concept of coupling is usually related to the concept of cohesion: low coupling facilitates high cohesion, and vice versa. For example, one approach to increasing cohesion is functional design, which seeks to limit the responsibilities of modules along functionally-related boundaries. Modules with single responsibilities tend to communicate less with other modules, which typically causes the side-effect of reduced coupling. This can also be seen in object-oriented programming, where coherence is said to increase when classes are re-factored to contain more closely-related code. This tends to cause the connections between the classes to become less dependent on their internal implementations, which results in reduced coupling. Specifically, coupling increases between two classes A and B if:
* A has an attribute that refers to (is of type) B.
* A calls on services of an object B.
* A has a method which references B (via return type or parameter).
* A is a subclass of (or implements) class B.
Low coupling may also reduce performance, and a highly-coupled system is sometimes desirable to achieve maximum efficiency. Regardless, in many modern computing systems, the cost of reduced performance is often seen as a worthy trade for the benefits to the software development process that result from low coupling.
For more details , Please visit the source site :
http://en.wikipedia.org/wiki/C oupling_(computer_science)
Answered by
Alok Gupta
, an ibibo Guru,
at
12:56 AM on September 06, 2008