《软件工程实践者的研究方法chapter07cn设计概念.ppt》由会员分享,可在线阅读,更多相关《软件工程实践者的研究方法chapter07cn设计概念.ppt(34页珍藏版)》请在优知文库上搜索。
1、These slides are designed to accompany Software Engineering:A Practitioners Approach,7/e(McGraw-Hill,2009).Slides copyright 2009 by Roger Pressman.1第七章n设计概念设计概念Slide Set to accompanySoftware Engineering:A Practitioners Approach,7/e by Roger S.PressmanSlides copyright 1996,2001,2005,2009 by Roger S.P
2、ressmanFor non-profit educational use onlyMay be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering:A Practitioners Approach,7/e.Any other reproduction or use is prohibited without the express written permission of the author.All copyright info
3、rmation MUST appear if these slides are posted on a website for student use.分析模型-设计模型These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,20052A nal ysi s M
4、 odeluse-cases-text use-case di agram s acti vi ty di agram s swi m l ane di agram sdata fl ow di agram s control-fl ow di agram s processi ng narrati vesf fl lo o w w-o o r ri ie e n n t te e d d e e l le e m m e e n n t ts sb b e e h h a a v v i io o r ra a l le e l le e m m e e n n t ts sc c l la
5、 a s ss s-b b a a s se e d de e l le e m m e e n n t ts ss sc c e e n n a a r ri io o-b b a a s se e d de e l le e m m e e n n t ts scl ass di agram s anal ysi s packages CRC m odel s col l aborati on di agram s state di agram s sequence di agram sD D a a t ta a/C C l la a s ss s D D e e s si ig g n
6、 nA A r rc c h h i it te e c c t tu u r ra a l l D D e e s si ig g n nI In n t te e r rf fa a c c e e D D e e s si ig g n nC C o o m m p p o o n n e e n n t t-L L e e v v e e l l D D e e s si ig g n nDesi gn M odel设计与质量n设计必须实现所有包含在分析模型中的明确需求,并且必须满足客户期望的所有隐含需求。n对于那些生成代码的人和那些进行测试以及随后维护的人而言,设计必须是可读的,可理
7、解的指南。n设计必须提供软件的全貌,以实现的角度说明数据域、功能域和行为域。These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,20053质量指导原则n设计应展示出这样一种结构:n(a)已经使用可识别的体系结构风格或模式创建。n(b)由展示出良好设计特征的构
8、件构成n(c)能够以一种演化的方式实现n设计应该模块化,也就是说,软件应该按照逻辑划分为元素或子系统n设计应该包含数据、体系结构、接口和构件的清楚的表示n设计应该导出数据结构,这些数据结构适用于要实现的类,并从可识别的数据模式提取n设计应该导出显示独立功能特征的构件n设计应该能导出接口n设计的导出应根据软件需求分析过程中获取的信息,采用可重复的方法进行n应使用能够有效传达其意义的方法来表达设计。These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Ap
9、proach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,20054通用设计任务集设计过程做什么?nPage 131(TaskSet)These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Assoc
10、iates,Inc.,copyright 1996,2001,20055基本概念n抽象数据、过程、控制n体系结构软件的整体结构n模式传递了一个业已验证的设计解决方案的“精髓”n模块化封装了数据和功能n隐藏可控制的接口n功能独立专一功能以及低耦合n重构是一种简化设计的重组织技巧,不改变代码外部行为而改进其内部结构,These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permissio
11、n by R.S.Pressman&Associates,Inc.,copyright 1996,2001,20056数据抽象These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,20057implemented as a data structure过程抽象
12、These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,20058implemented with a knowledge of the object that is associated with enter抽 象抽象度减弱抽象度减弱抽象度增加抽象度增加资产资
13、产不动产不动产存款存款银行账户银行账户支票支票股票股票证券证券债券债券在同等层次的元素,在同等层次的元素,通常应改在同等的抽象级别上通常应改在同等的抽象级别上体系结构概念These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,200510系统由哪些构件构成,以及
14、构件之间构成的方式结构属性.软件架构设计表示了系统的组件(模块、对象以及过滤器),以及这些组件如何打包和交互的。非功能属性 体系结构设计需要表示设计的体系结构是如何满足性能、可靠性、安全性、可适配性以及其他一些系统特征。一组相关系统 体系结构设计需要基于可重用的模式,这些模式经常在相关的系统中碰到。核心是,设计必须有重用较小的体系结构构件模块的能力。模式v设计模式描述了在某个特定场景与可能影响模式应用和使用方式的“影响力”中解决某个特定的设计问题的设计结构。v每个设计模式的目的都是提供一个描述,以使得设计人员能够确定:(1)模式是否适合当前的工作;(2)模式是否能够复用;(3)模式是否能够用于
15、指导开发一个类似但是功能或结构不同的模式。关注点分离v关注点分离是一个设计概念,它表明任何复杂问题如果被分解为可以独立解决和(或)优化的若干块,该复杂问题能够更容易地被处理。一个关注点是一个特征或行为,被指定为软件需求模型的一部分。通过将关注点分割为更小的关注点,使得解决一个问题需要付出更少的工作量和时间。模块化设计These courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permiss
16、ion by R.S.Pressman&Associates,Inc.,copyright 1996,2001,200513easier to build,easier to change,easier to fix.模块化(Modularity)n将某些复杂的东西切割成可管理的部件n帮助人们理解复杂系统举例:模块化n将复杂系统切成小模块的例子计费子系计费子系统统课程注册系统课程注册系统课程目录课程目录系统系统学生管理学生管理系统系统模块化:Trade-offsThese courseware materials are to be used in conjunction with Software Engineering:A Practitioners Approach,6/e and are provided with permission by R.S.Pressman&Associates,Inc.,copyright 1996,2001,200516信息隐蔽These courseware materials are to be used in conjunction wit