Desirable Characteristics of Design (Code Complete)
2024-10-12 14:22:10 0 Report
Login to view full content
Other creations by the author
Outline/Content
Minimize complexity
The primary goal of design should be to minimize complexity. Avoid doing "smart" designs. Smart designs are usually hard to understand. Instead, do "simple" and "easy to understand" designs. If your design doesn't allow you to safely ignore most other parts of the program while immersed in a specific part, then the design is not doing its job.
Easy to maintain
Ease of maintenance means designing for the maintenance programmer. Constantly imagine the questions the maintenance programmer will have about the code you write. Consider the maintenance programmer as your audience and then design the system to be self-explanatory.
Minimum Connectivity
Minimum connectivity means minimizing the connections between different parts of the program during design. Use the principles of strong cohesion, loose coupling, and information hiding to design classes with as few interconnections as possible. Minimum connections minimize the work during integration, testing, and maintenance.
Reusability
Reusability means that when designing a system, you can reuse its various parts in other systems.
Lean
Lean refers to designing a system without any superfluous parts (Wirth, 1995; McConnell, 1997). Voltaire said, "A book is finished, not because it can no longer be added to, but because it can no longer be taken away from." This is especially true in software, because additional code must be developed, reviewed, tested, and considered when modifying other code. Future versions of the software must be backward compatible with the additional code.
Standardization
A system is the more intimidating to someone trying to understand it for the first time, the more it relies on external components. Try to use standardized, universal methods to give the whole system a familiar feel.
Scalability
Scalability means you can enhance the system without breaking the underlying structure. You can change a part of the system without affecting other parts of the system. The most likely changes cause the least trauma to the system.
High fan-in
High fan-in refers to the large number of classes that use a particular class. High fan-in means that a system is well designed to make full use of the lower-level utility classes in the system.
Medium-low fan-out
Low to moderate fan-out refers to a class that only uses a low to moderate number of other classes. High fan-out (more than about 7) indicates that a class uses a large number of other classes, and therefore may be too complex. Researchers have found that the low fan-out principle is beneficial, regardless of whether the number of routines called within a routine or the number of routines called within a class is considered.
Portability
Portability refers to the design of a system that makes it easy to move it to another environment.
Layered design
Layered design means to maintain the decomposition hierarchy as much as possible, so that you can view the system at any level and get a consistent view. When designing a system, you can view it at one level without having to delve into other levels.
Collect
Collect
Collect
Collect
0 Comments
Next page
Recommended for you
More