DESIGN HEURISTICS FOR EFFECTIVE MODULARITY Once program structure has been developed, effective modularity can be achieved
13.6 DESIGN HEURISTICS FOR EFFECTIVE MODULARITY Once program structure has been developed, effective modularity can be achieved
by applying the design concepts introduced earlier in this chapter. The program struc- ture can be manipulated according to the following set of heuristics:
1. Evaluate the "first iteration" of the program structure to reduce coupling and improve cohesion. Once the program structure has been developed, modules
“The notion that good may be exploded or imploded with an eye toward improving module inde- [design] techniques
pendence. An exploded module becomes two or more modules in the final restrict creativity is
program structure. An imploded module is the result of combining the pro- like saying that an
cessing implied by two or more modules. artist can paint
An exploded module often results when common processing exists in two without learning the
details of form or a or more modules and can be redefined as a separate cohesive module. When musician does not
high coupling is expected, modules can sometimes be imploded to reduce need knowledge of
passage of control, reference to global data, and interface complexity. music theory.”
2. Attempt to minimize structures with high fan-out; strive for fan-in as depth
Marvin Zelkowitz et al.
increases. The structure shown inside the cloud in Figure 13.7 does not make effective use of factoring. All modules are “pancaked” below a single control
PA R T T H R E E C O N V E N T I O N A L M E T H O D S F O R S O F T WA R E E N G I N E E R I N G
F I G U R E 13.7
Program structures
Avoid a "pancaked" structure
module. In general, a more reasonable distribution of control is shown in the upper structure. The structure takes an oval shape, indicating a number of layers of control and highly utilitarian modules at lower levels.
3. Keep the scope of effect of a module within the scope of control of that module. The scope of effect of module e is defined as all other modules that are affected by a decision made in module e. The scope of control of module e is all modules that are subordinate and ultimately subordinate to module e. Referring to Figure 13.7, if module e makes a decision that affects module r, we have a violation of this heuristic, because module r lies outside the scope of control of module e.
4. Evaluate module interfaces to reduce complexity and redundancy and improve consistency. Module interface complexity is a prime cause of software errors. Interfaces should be designed to pass information simply and should be con- sistent with the function of a module. Interface inconsistency (i.e., seemingly
CHAPTER 13
DESIGN CONCEPTS AND PRINCIPLES
unrelated data passed via an argument list or other technique) is an indica- tion of low cohesion. The module in question should be reevaluated.
5. Define modules whose function is predictable, but avoid modules that are overly restrictive. A module is predictable when it can be treated as a black box; that
WebRef is, the same external data will be produced regardless of internal processing
details. 7 Modules that have internal "memory" can be unpredictable unless
A detailed report on software design methods
care is taken in their use. including a discussion of
A module that restricts processing to a single subfunction exhibits high all design concepts and
cohesion and is viewed with favor by a designer. However, a module that principles found in this
chapter can be obtained arbitrarily restricts the size of a local data structure, options within control at
flow, or modes of external interface will invariably require maintenance to
www.dacs.dtic.mil/
remove such restrictions.
techs/design/ Design.ToC.html
6. Strive for “controlled entry” modules by avoiding "pathological connections." This design heuristic warns against content coupling. Software is easier to under- stand and therefore easier to maintain when module interfaces are con- strained and controlled. Pathological connection refers to branches or references into the middle of a module.
Parts
» The Concurrent Development Model
» SUMMARY Software engineering is a discipline that integrates process, methods, and tools for
» PEOPLE In a study published by the IEEE [CUR88], the engineering vice presidents of three
» THE PROCESS The generic phases that characterize the software process—definition, development,
» THE PROJECT In order to manage a successful software project, we must understand what can go
» METRICS IN THE PROCESS AND PROJECT DOMAINS
» Extended Function Point Metrics
» METRICS FOR SOFTWARE QUALITY
» INTEGRATING METRICS WITHIN THE SOFTWARE PROCESS
» METRICS FOR SMALL ORGANIZATIONS
» ESTABLISHING A SOFTWARE METRICS PROGRAM
» Obtaining Information Necessary for Scope
» An Example of LOC-Based Estimation
» QUALITY CONCEPTS 1 It has been said that no two snowflakes are alike. Certainly when we watch snow
» SUMMARY Software quality assurance is an umbrella activity that is applied at each step in the
» R diagram 1.4 <part-of> data model; data model <part-of> design specification;
» SYSTEM MODELING Every computer-based system can be modeled as an information transform using an
» Facilitated Application Specification Techniques
» Data Objects, Attributes, and Relationships
» Entity/Relationship Diagrams
» Hatley and Pirbhai Extensions
» Creating an Entity/Relationship Diagram
» SUMMARY Design is the technical kernel of software engineering. During design, progressive
» Data Modeling, Data Structures, Databases, and the Data Warehouse
» Data Design at the Component Level
» A Brief Taxonomy of Styles and Patterns
» Quantitative Guidance for Architectural Design
» Isolate the transform center by specifying incoming and outgoing
» SUMMARY Software architecture provides a holistic view of the system to be built. It depicts the
» The User Interface Design Process
» Defining Interface Objects and Actions
» D E S I G N E VA L U AT I O N
» Testing for Real-Time Systems
» Organizing for Software Testing
» Criteria for Completion of Testing
» The Transition to a Quantitative View
» The Attributes of Effective Software Metrics
» Architectural Design Metrics
» Component-Level Design Metrics
» SUMMARY Software metrics provide a quantitative way to assess the quality of internal product
» Encapsulation, Inheritance, and Polymorphism
» Identifying Classes and Objects
» The Common Process Framework for OO
» OO Project Metrics and Estimation
» Event Identification with Use-Cases
» SUMMARY Object-oriented analysis methods enable a software engineer to model a problem by
» Partitioning the Analysis Model
» Designing Algorithms and Data Structures
» Program Components and Interfaces
» SUMMARY Object-oriented design translates the OOA model of the real world into an
» Testing Surface Structure and Deep Structure
» Deficiencies of Less Formal Approaches 1
» What Makes Cleanroom Different?
» Design Refinement and Verification
» SUMMARY Cleanroom software engineering is a formal approach to software development that
» Structural Modeling and Structure Points
» Describing Reusable Components
» SUMMARY Component-based software engineering offers inherent benefits in software quality,
» Guidelines for Distributing Application Subsystems
» Middleware and Object Request Broker Architectures
» An Overview of a Design Approach
» Consider expert Web developer will create a complete design, but time and cost can be appropriate
» A Software Reengineering Process Model
» Reverse Engineering to Understand Data
» Forward Engineering for Client/Server Architectures
» SUMMARY Reengineering occurs at two different levels of abstraction. At the business level,
Show more