1、附 录 Software Engineering-A PRACTITIONERS APPROACH Written by Roger S. Pressman, Ph.D. ( P.340-P.343) 13.3 DESIGN PRINCIPLES Software design is both a process and a model. The design process is a sequence ofsteps that enable the designer to describe all aspects of the software to be built. It is impo
2、rtant to note, however, that the design process is not simply a cookbook. Creative skill, past experience, a sense of what makes “good” software, and an overallcommitment to quality are critical success factors for a competent design. The design model is the equivalent of an architects plans for a h
3、ouse. It begins by representing the totality of the thing to be built (e.g., a three-dimensional renderingof the house) and slowly refines the thing to provide guidance for constructing eachdetail (e.g., the plumbing layout). Similarly, the design model that is created for softwareprovides a variety
4、 of different views of the computer software. Basic design principles enable the software engineer to navigate the design process.Davis suggests a setof principles for software design, which have beenadapted and extended in the following list: The design process should not suffer from “tunnel vision
5、.” A gooddesigner should consider alternative approaches, judging each based on therequirements of the the resources available to do the job, and thedesign concepts presented in Section The design should be traceable to the analysis model. Because a singleelement of the design model often traces to
6、multiple requirements, it is necessaryto have a means for tracking how requirements have been satisfied bythe design model. The design should not reinvent the wheel. Systems are constructed usinga set of design patterns, many of which have likely been encountered before.These patterns should always
7、be chosen as an alternative to reinvention.Time is short and resources are limited! Design time should be invested inrepresenting truly new ideas and integrating those patterns that already exist. The design should “minimize the intellectual distance” between the software and the problem as it exist
8、s in the real world.That is, the structure of the software design should (whenever possible)mimic the structure of the problem domain. The design should exhibit uniformity and integration. A design is uniformif it appears that one person developed the entire thing. Rules of styleand format should be
9、 defined for a design team before design work begins. Adesign is integrated if care is taken in defining interfaces between designComponents. The design should be structured to accommodate change. The designconcepts discussed in the next section enable a design to achieve this principle. The design
10、should be structured to degrade gently, even when aberrantdata, events, or operating conditions are encountered. Welldesignedsoftware should never “bomb.” It should be designed toaccommodate unusual circumstances, and if it must terminate processing, doso in a graceful manner. Design is not coding,
11、coding is not design. Even when detailed proceduraldesigns are created for program components, the level of abstraction ofthe design model is higher than source code. The only design decisions madeat the coding level address the small implementation details that enable theprocedural design to be cod
12、ed. The design should be assessed for quality as it is being created, notafter the fact. A variety of design concepts (Section 13.4) and design measures(Chapters 19 and 24) are available to assist the designer in assessing quality. The design should be reviewed to minimize conceptual (semantic)error
13、s. There is sometimes a tendency to focus on minutiae when the design isreviewed, missing the forest for the trees. A design team should ensure thatmajor conceptual elements of the design (omissions, ambiguity, inconsistency)have been addressed before worrying about the syntax of the design model. W
14、hen these design principles are properly applied, the software engineer creates a designthat exhibits both external and internal quality factors . External quality factorsare those properties of the software that can be readily observed by users (e.g., speed,reliability, correctness, usability).Inte
15、rnal quality factors are of importance to softwareengineers. They lead to a high-quality design from the technical perspective. To achieveinternal quality factors, the designer must understand basic design concepts. 13.4 DESIGN CONCEPTS A set of fundamental software design concepts has evolved over
16、the past four decades.Although the degree of interest in each concept has varied over the years, each hasstood the test of time. Each provides the software designer with a foundation fromwhich more sophisticated design methods can be applied. Each helps the softwareengineer to answer the following questions: