Information Technology Reference
In-Depth Information
6. Sequential—the output of one part in a module serves as the input for an other
part
7. Functional—each part of the module is necessary for the execution of a function
Coupling 11
17.2.6
Coupling can be defined as the degree each program module relies on another program
module. It is in a programmer's best interest to reduce coupling so that changes to
one unit of code do not affect another. A program is considered to be modular if it is
decomposed into several small, manageable parts. 12 The following is a list of factors
in defining a manageable module: the modules must be independent of each other,
the module implements an indivisible function, and the module should have only one
entrance and one exit. In addition to this list, the function of a module should be
unaffected by: the source of its input, the destination of its output, and the history
of the module. Modules also should be small, which means that they should have
less than one page of source code, less than one page of flowchart, and less than 10
decision statements.
Coupling also has been characterized in increasing levels, starting with:
1. No direct coupling —where all modules are unrelated
2. Data —when all arguments are homogenous data items
3. Stamp —when a data structure is passed from one module to another, but that
module operates on only some data elements of the structure
4. Control —one module passes an element of control to another
5. Common —if two modules have access to the same global data
6. Content —one module directly references the contents of another
17.3
COMPARING SOFTWARE OPTIMIZATION METRICS
Some of the most effective response time techniques are probably cohesion and
coupling. As discussed, the LOC metric is rather outdated and is usually not that
effective anymore. This metric was used commonly in the 1960s but is not used
much today. In fact, it could be viewed as a professional malpractice to use LOC as
a metric if more than one programming language is part of the study or the study
seeks to measure real economic productivity. Instead of using the LOC metric, some
organizations look to use function point analysis.
Function point analysis was introduced in the late 1970s as an alternative to
the LOC metric. Function point metrics have become the dominant metric for
some types of economic and quality studies; however, there are several issues that
have kept function point metrics from becoming the industry standard. As discussed,
11 See Chapter 13.
12 http://www.jodypaul.com/SWE/HAL/hal.html
Search WWH ::




Custom Search