|
| |
Next: The LIAR Error reporting
Up: What is a LIAR
Previous: Image analysis routine design
Coupling measures the strength of relationship one
module to has to others. The lower the coupling the more independent
and portable the module is. However, coupling is multidimensional
as shown in Fig. 4.
Figure 4: Coupling dimensions
LIAR functions should strive for the lowest degree of coupling
possible. Therefore:
- Size: the lower the number of variables passed the
better. Pass only the variables used to the function. Coupling
is not reduced simply by bundling the parameters into a data
structure to be passed. On the contrary, coupling is increased
because the module will become dependent on external modules
to create the data structure and to define the data
structure. Also, observability will be reduced.
- What is passed: only parameters should be
communicated and control flags should be avoided. Control
flags decrease the cohesiveness of the function. All decisions
should be made at a higher level rather than at bottom
level code.
- Type of connection: avoid communicating parameters via external
variables or through shared data areas.
Ed Breen
Tue Sep 3 17:19:31 EST 1996
|