




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、软件工程实践者的研究方法课件软件工程实践者的研究方法课件 牛牛文库文档分享2DesignMitch Kapor, the creator of Lotus 1-2-3, presented a “software design manifesto” in Dr. Dobbs Journal. He said:Good software design should exhibit:Firmness: A program should not have any bugs that inhibit its function. Commodity: A program should be suitab
2、le for the purposes for which it was intended. Delight: The experience of using the program should be pleasurable one. 牛牛文库文档分享4DesignM 牛牛文库文档分享3Analysis Model - Design Model 牛牛文库文档分享5Analysi 牛牛文库文档分享4Design and Qualitythe design must implement all of the explicit requirements contained in the analy
3、sis 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, addre
4、ssing the data, functional, and behavioral domains from an implementation perspective. 牛牛文库文档分享6Design 牛牛文库文档分享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 des
5、ign characteristics and (3) can be implemented in an evolutionary fashion For smaller systems, design can sometimes be developed linearly.A design should be modular; that is, the software should be logically partitioned into elements or subsystemsA design should contain distinct representations of d
6、ata, architecture, interfaces, and components.A design should lead to data structures that are appropriate for the classes to be implemented and are drawn from recognizable data patterns.A design should lead to components that exhibit independent functional characteristics.A design should lead to in
7、terfaces 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 c
8、ommunicates its meaning. 牛牛文库文档分享7Quality 牛牛文库文档分享6Design PrinciplesThe design process should not suffer from tunnel vision. The design should be traceable to the analysis model. The design should not reinvent the wheel. The design should “minimize the intellectual distance” DAV95 between the softwa
9、re 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 structured to degrade gently, even when aberrant data, events, or operating conditions are encountered. Design is not c
10、oding, coding is not design. 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.From Davis DAV95 牛牛文库文档分享8Design 牛牛文库文档分享7Fundamental ConceptsAbstractiondata, procedure, controlArchitecturethe o
11、verall structure of the softwarePatterns”conveys the essence” of a proven design solutionSeparation of concernsany complex problem can be more easily handled if it is subdivided into piecesModularitycompartmentalization of data and functionHidingcontrolled interfacesFunctional independencesingle-min
12、ded function and low couplingRefinementelaboration of detail for all abstractionsAspectsa mechanism for understanding how global requirements affect designRefactoringa reorganization technique that simplifies the designOO design conceptsAppendix IIDesign Classesprovide design detail that will enable
13、 analysis classes to be implemented 牛牛文库文档分享9Fundame 牛牛文库文档分享8Data Abstractiondoorimplemented as a data structuremanufacturermodel numbertypeswing directioninsertslights type numberweightopening mechanism 牛牛文库文档分享10Data A 牛牛文库文档分享9Procedural Abstractionopenimplemented with a knowledge of the object
14、that is associated with enterdetails of enter algorithm 牛牛文库文档分享11Proced 牛牛文库文档分享10Architecture“The overall structure of the software and the ways in which that structure provides conceptual integrity for a system.” SHA95aStructural properties. This aspect of the architectural design representation
15、defines the components of a system (e.g., modules, objects, filters) and the manner in which those components are packaged and interact with one another. For example, objects are packaged to encapsulate both data and the processing that manipulates the data and interact via the invocation of methods
16、 Extra-functional properties. The architectural design description should address how the design architecture achieves requirements for performance, capacity, reliability, security, adaptability, and other system characteristics.Families of related systems. The architectural design should draw upon
17、repeatable patterns that are commonly encountered in the design of families of similar systems. In essence, the design should have the ability to reuse architectural building blocks. 牛牛文库文档分享12Archit 牛牛文库文档分享11PatternsDesign Pattern TemplatePattern namedescribes the essence of the pattern in a short
18、 but expressive name Intentdescribes the pattern and what it doesAlso-known-aslists any synonyms for the patternMotivationprovides an example of the problem Applicabilitynotes specific design situations in which the pattern is applicableStructuredescribes the classes that are required to implement t
19、he patternParticipantsdescribes the responsibilities of the classes that are required to implement the patternCollaborationsdescribes how the participants collaborate to carry out their responsibilitiesConsequencesdescribes the “design forces” that affect the pattern and the potential trade-offs tha
20、t must be considered when the pattern is implementedRelated patternscross-references related design patterns 牛牛文库文档分享13Patter 牛牛文库文档分享12Separation of ConcernsAny complex problem can be more easily handled if it is subdivided into pieces that can each be solved and/or optimized independentlyA concern
21、 is a feature or behavior that is specified as part of the requirements model for the softwareBy separating concerns into smaller, and therefore more manageable pieces, a problem takes less effort and time to solve. 牛牛文库文档分享14Separa 牛牛文库文档分享13Modularitymodularity is the single attribute of software
22、that allows a program to be intellectually manageable Mye78. Monolithic software (i.e., a large program composed of a single module) cannot be easily grasped by a software engineer. The number of control paths, span of reference, number of variables, and overall complexity would make understanding c
23、lose to impossible. In almost all instances, you should break the design into many modules, hoping to make understanding easier and as a consequence, reduce the cost required to build the software. 牛牛文库文档分享15Modula 牛牛文库文档分享14Modularity: Trade-offsWhat is the right number of modules for a specific so
24、ftware design?optimal number of modules cost of softwarenumber of modulesmoduleintegrationcostmodule development cost 牛牛文库文档分享16Modula 牛牛文库文档分享15Information Hidingmodulecontrolledinterfacesecret algorithm data structure details of external interface resource allocation policyclientsa specific design
25、 decision 牛牛文库文档分享17Inform 牛牛文库文档分享16Why Information Hiding?reduces the likelihood of “side effects”limits the global impact of local design decisionsemphasizes communication through controlled interfacesdiscourages the use of global dataleads to encapsulationan attribute of high quality designresul
26、ts in higher quality software 牛牛文库文档分享18Why In 牛牛文库文档分享17Stepwise Refinementopenwalk to door;reach for knob;open door;walk through;close door.repeat until door opensturn knob clockwise;if knob doesnt turn, then take key out; find correct key; insert in lock;endifpull/push doormove out of way;end rep
27、eat 牛牛文库文档分享19Stepwi 牛牛文库文档分享18Sizing Modules: Two Views 牛牛文库文档分享20Sizing 牛牛文库文档分享19Functional IndependenceFunctional independence is achieved by developing modules with single-minded function and an aversion to excessive interaction with other modules.Cohesion is an indication of the relative funct
28、ional strength of a module.A cohesive module performs a single task, requiring little interaction with other components in other parts of a program. Stated simply, a cohesive module should (ideally) do just one thing. Coupling is an indication of the relative interdependence among modules.Coupling d
29、epends on the interface complexity between modules, the point at which entry or reference is made to a module, and what data pass across the interface. 牛牛文库文档分享21Functi 牛牛文库文档分享20AspectsConsider two requirements, A and B. Requirement A crosscuts requirement B “if a software decomposition refinement
30、has been chosen in which B cannot be satisfied without taking A into account. Ros04An aspect is a representation of a cross-cutting concern. 牛牛文库文档分享22Aspect 牛牛文库文档分享21AspectsAn ExampleConsider two requirements for the SafeHomeA WebApp. Requirement A is described via the use-case Access camera surve
31、illance via the Internet. A design refinement would focus on those modules that would enable a registered user to access video from cameras placed throughout a space. Requirement B is a generic security requirement that states that a registered user must be validated prior to using SafeHomeA. This r
32、equirement is applicable for all functions that are available to registered SafeHome users. As design refinement occurs, A* is a design representation for requirement A and B* is a design representation for requirement B. Therefore, A* and B* are representations of concerns, and B* cross-cuts A*. An
33、 aspect is a representation of a cross-cutting concern. Therefore, the design representation, B*, of the requirement, a registered user must be validated prior to using SafeHomeA, is an aspect of the SafeHome WebApp. 牛牛文库文档分享23Aspect 牛牛文库文档分享22RefactoringFowler FOW99 defines refactoring in the follo
34、wing manner: Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code design yet improves its internal structure.”When software is refactored, the existing design is examined for redundancyunused design elementsinefficient or unn
35、ecessary algorithmspoorly constructed or inappropriate data structuresor any other design failure that can be corrected to yield a better design. 牛牛文库文档分享24Refact 牛牛文库文档分享23OO Design ConceptsDesign classesEntity classesBoundary classesController classesInheritanceall responsibilities of a superclass
36、 is immediately inherited by all subclassesMessagesstimulate some behavior to occur in the receiving objectPolymorphisma characteristic that greatly reduces the effort required to extend the design 牛牛文库文档分享25OO Des 牛牛文库文档分享24Design ClassesAnalysis classes are refined during design to become entity c
37、lassesBoundary classes are developed during design to create the interface (e.g., interactive screen or printed reports) that the user sees and interacts with as the software is used. Boundary classes are designed with the responsibility of managing the way entity objects are represented to users. Controller classes are designed to manage the creation or update of entity objects; the instantiation of boundary objects as they obtain information from entity objects; complex communication between sets of objects; val
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 科技兴趣班教学课件下载
- 收音机电工电子技术课件
- 教育技术工具在办公效率提升中的作用
- 教育政策在办公空间优化中的作用
- 智慧教育心理引导与学习策略的融合
- 面向未来教育心理学的跨界融合应用
- 保护鼻子健康指南
- 医疗诊断中的患者心理反应研究
- 胆囊结石科普护理知识
- 小班上学期健康活动
- 2024-2030年陕西省天然气行业市场现状供需分析及重点企业投资评估规划分析研究报告
- DL∕T 1881-2018 智能变电站智能控制柜技术规范
- 【心脏介入诊疗术后并发症的观察与护理探究进展文献综述5000字】
- 透析患者急性左心衰的个案护理(精制手工图文)
- (高清版)JTGT D81-2017 公路交通安全设施设计细则
- 2024-2030年中国航天炉行业市场发展趋势与前景展望战略分析报告
- HYT 215-2017 近岸海域海洋生物多样性评价技术指南
- (正式版)SHT 3551-2024 石油化工仪表工程施工及验收规范
- 烫伤伤口护理个案汇报
- 体适能评定理论与方法课件
- 唐玄、肃之际中枢政局研究
评论
0/150
提交评论