You
are here: Freetutes.com
> Systems
Analysis and Design
Coupling
Coupling is a measure of interconnection among modules in a program structure.
Coupling depends on the interface complexity between modules, the point at which
entry or reference is made to a module, and what data pass across the interface.
Or, simply it is Strength of the connections between modules Coupling can be represented.
As the number of different items being passed (not amount of data) rises the module
interface complexity rises. It is number of different items that increase the
complexity not the amount of data.
In general, the more we must know about module A in order to understand module
B, the more closely connected A is to B "Highly coupled".

Modules are joined by strong interconnections, "loosely coupled"
modules have weak interconnections. Independent modules have no interconnections,
for being able to solve and modify a module separately, we would like the module
to be loosely coupled with other modules. Coupling in an abstract concept and
is as yet not quantifiable. So, no formulas can be given to determine the coupling
between two modules. However, some major factors can be identified as influencing
coulping between modules. Among them the most important are the type of connection
between modules and the complexity of the interface, and the type of information
flow between modules.
Coupling increases with the complexity and abscurity of the interface between
modules. To keep coupling low we would like to minimize the number of interface
per module. And minimize the complexity of each interface. An interface of a module
is used to pass information to and from modules. There are two kinds of information
that can flow along an interface;
- data
- control
Passing or recieving back control information means that the action of the
module will depend on this control information, which makes it more difficult
to understand the module and provide its abstraction. Transfer of data information
means that a module passes as input some data to another module and gets in return
some data as output. Coupling may also be represented on a spectrum as shown below:

Coupling
No Direct Coupling

No direct coupling between M1 and M2
The modules are subordinated to different modules. Therefore, no direct coupling
Data Coupling

In this the argument list data that is passed to the module. In this type of
coupling only data flows across modules. Data coupling is minimal.
Stamp Coupling

In stamp coupling dta structure is passed via argument list
Control Coupling

Control is passed via a flag (1 bit)
Common Coupling
Common coupling occurs when there are common data areas. That is there are
modules using data that are global. It should be avoided.

Content Coupling
If there is data access within the boundary of another. For example, passing
pointer can be considered as content coupling or branch into the middle of a module.

One module makes use of data or control information maintained within the boundary
of another module.
See Also
<< Previous
Page | Contents
| Next Page >>
|