Subscribe by Email

Friday, June 19, 2009

Software processes: Effective Modular Design

Information hiding: Modules should be specified and designed so that the internal details of modules should be invisible or inaccessible to other modules. Hiding implies that effective modularity can be achieved by defining a set of independent modules that communicate with one another only that information necessary to achieve software function. Hiding defines and enforces access constraints to both procedural detail within a module and any local data structure used by the module.

Major benefits: reduce the change impacts in testing and maintenance.

Functional independence:
Functional independence is achieved by developing modules with “single minded” function and an “aversion” to excessive interaction with other modules. Independent modules are easier to maintain because secondary effects caused by design or code modification are limited, error propagation is reduced and reusable modules are possible.

Design modules based on independent functional features
Major benefits: effective modularity

Independence is assessed using two qualitative criteria : cohesion and coupling.
Cohesion: a natural extension of the information hiding concept a module may perform a number of tasks. A cohesive module performs a single task in a procedure with little interactions with others.

Goal: to achieve high cohesion for modules in a system.

Different types of cohesion:
- coincidentally cohesive: a set of tasks related to each other loosely.
- logical connection among processing elements ---> logically cohesive.
- data sharing among processing elements --> communication cohesion.
- order among processing elements --> procedural cohesion.

Coupling : a measure of interconnection among modules in a program structure. Coupling depends on the interface complexity between modules.
Goal: to strive for lowest possible coupling among modules.
Good coupling ---> reduce or avoid change impact and ripple effects.
---> reduce the cost in program changes, testing, maintenance

Types of coupling:
- data coupling: parameter passing or data interaction
- control coupling: share related control logical (for a control data)
- common coupling: common data sharing
- content coupling: module A use of data or control information maintained in another module.

No comments:

Facebook activity