Two principles to help create robust, reusable object-oriented design apps
Monday, November 11, 2002 12:00 PM
To help you create better-designed applications, I've identified the object-oriented design (OOD) elements of good and bad designs. Then, I'll introduce two design principles that can help you create more scalable, robust, and reusable applications.
Good design
Well-designed applications offer software components that are more robust, more maintainable, and more reusable. Such applications should be able to adapt changing business needs without affecting design. For example, a banking application should be able to support new types of accounts without a change in the existing design.
Three key points of good design are:
- Maintainability, which is the ease with which a software system or component can be modified to adapt to changing environments, improve performance, correct faults, or other attributes. Well-designed applications require fewer resources for maintenance and changes.
- Reusability, which is the degree to which a software module or components can be used in more than one computing program or software system. Reusability of software components helps ensure faster development of software applications.
- Robustness, which is the stability of software applications in extreme situations (e.g., maximum load conditions, erroneous user inputs). Robust applications have less downtime and can reduce maintenance costs.
Bad design
Nobody plans to create ill-designed applications. It often happens because of a lack of experience or because the app was designed quickly to meet an extremely tight deadline. Poorly designed applications usually have these problems in common:
- They're rigid. A design is rigid if it cannot be easily changed. For example, a single change to heavily interdependent, rigid software could begin a cascade of changes in dependent packages. When such a program grows in size, the designers or maintainers cannot predict the extent of that cascade of change, and the impact of the change cannot be estimated. This makes the cost of the change impossible to estimate.
- They're fragile. Poorly created programs have a tendency to break in many places when a single change is made. Simple changes to one part of the application can lead to failures in other parts that appear to be completely unrelated. Fixing those problems leads to even more issues, and the maintenance process begins to resemble a dog chasing its tail. Such fragility greatly decreases the credibility of the design and maintenance organization, which leaves users and managers unable to predict the future quality of the product.
- They're not reusable. A design is difficult to reuse when its desirable parts are highly dependent upon other details, which aren't desired. If the design is highly interdependent, other designers will also be daunted by the amount of work necessary to separate the desirable portion of the design from the parts that aren't reusable. In most such cases, the cost of the separation is deemed to be higher than the cost of redevelopment of the design.
To realize the benefits of a well-designed application, you can follow one of two fundamental principles: the Open-Closed Principle (OCP) or the Liskov Substitution Principle (LSP).





There are currently no comments for this post.