
软件工程-实践者的研究方法(7).pptx
30页1Chapter 8nDesign ConceptsSoftware Engineering: A Practitioners Approach, 7/e by Roger S. Pressman2DesignnGood software design should exhibit:nFirmness(稳定性): A program should not have any bugs that inhibit its function. nCommodity(适用性): A program should be suitable for the purposes for which it was intended. nDelight(令人愉快): The experience of using the program should be pleasurable one.3Analysis Model = Design Model43 Characters of Design Qualitythe design must implement all of the explicit(明确的) requirements contained in the analysis model, and it must accommodate all of the implicit(隐含的) requirements desired by the customer.the design must be a readable, understandable guide for those who generate code and for those who test and subsequently support the software.the design should provide a complete picture(全貌) of the software, addressing the data, functional, and behavioral domains from an implementation perspective.5Quality GuidelinesA design should exhibit an architecture that (1) has been created using recognizable architectural styles or patterns, (2) is composed of components that exhibit good design characteristics and (3) can be implemented in an evolutionary fashionA design should be modular; that is, the software should be logically partitioned into elements or subsystemsA design should contain representations of data, architecture, interfaces, and components.A design should lead to data structures that are appropriate for the classes to be implemented.A design should lead to components that exhibit independent functional characteristics.A design should lead to interfaces that reduce the complexity of connections between components and with the external environment.A design should be derived using a repeatable method that is driven by information obtained during software requirements analysis.A design should be represented using a notation that effectively communicates its meaning.6Design PrinciplesThe design should be traceable to the analysis model. The design should not reinvent(彻底改造) the wheel. The design should “minimize the distance” between the software and the problem as it exists in the real world. The design should exhibit uniformity and integration. The design should be structured to accommodate change. The design should be assessed for quality as it is being created, not after the fact. The design should be reviewed to minimize conceptual (semantic) errors.Design is not coding, coding is not design. From Davis DAV957Fundamental ConceptsnAbstractiondata, procedurenArchitecture(架构)the overall structure of the softwarenPatternsconveys(承载) the essence(精髓) of a proven design solutionnModularitycompartmentalization(划分) of data and functionnInformation hidingcontrolled interfacesnFunctional independencesingle-minded function and low couplingnAspectsa mechanism for understanding how global requirements affect designnRefactoring(重构)a reorganization technique that simplifies the designnDesign Classesprovide design detail that will enable analysis classes to be implemented8Data Abstractiondoordoorimplemented as a data structuremanufacturermanufacturermodel numbermodel numbertypetypeswing directionswing directioninsertsinsertslightslightsweightweightopening mechanismopening mechanism9Procedural Abstractionopenopenimplemented with a knowledge of the object that is associated with enterdetails of enter details of enter algorithmalgorithm10Architecture“The overall structure of the software and the ways in which “The overall structure of the software and the ways in which that structure provides conceptual integrity for a system.”that structure provides conceptual integrity for a system.”Structural properties. This aspect of the architectural design This aspect of the architectural design representation defines the components of a system (e.g., modules, representation defines the components of a system (e.g., modules, objects) and the manner in which those components are packaged and objects) and the manner in which those components are packaged and interact with one another. For example, objects encapsulate both data interact with one another. For example, objects encapsulate both data and the processing that manipulates the data. and the processing that manipulates the data. Extra-functional properties. The architectural design description The architectural design description should address how the design architecture achieves requirements for should address how the design architecture achieves requirements for performance, capacity, reliability, security, adaptability, and other performance, capacity, reliability, security, adaptability, and other system characteristics.system characteristics.Families(族) of related systems. The architectural design should The architectural design should draw upon repeatable patterns that are commonly encountered in the draw upon repeatable patterns that are commonly encountered in the design of families of similar systems. The design should have the design of famili。
