书签 分享 收藏 举报 版权申诉 / 30
上传文档赚钱

类型-软件工程实践者的研究方法课件.ppt

  • 上传人(卖家):三亚风情
  • 文档编号:3229245
  • 上传时间:2022-08-08
  • 格式:PPT
  • 页数:30
  • 大小:505.01KB
  • 【下载声明】
    1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
    2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
    3. 本页资料《-软件工程实践者的研究方法课件.ppt》由用户(三亚风情)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
    4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
    5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
    配套讲稿:

    如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

    特殊限制:

    部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

    关 键  词:
    软件工程 实践 研究 方法 课件
    资源描述:

    1、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 intend

    2、ed.nDelight(令人愉快):The experience of using the program should be pleasurable one.3Analysis Model=Design ModelAnal ysi s M odeluse-cases-t ext use-case di agr am s act i vi t y di agr am s swi m l ane di agr am sdat a f l ow di agr am s cont r ol-f l ow di agr am s pr ocessi ng nar r at i vesf fl lo o

    3、w w-o or ri ie en nt te ed d e el le em m e en nt ts sb be eh ha av vi io or ra al le el le em m e en nt ts sc cl la as ss s-b ba as se ed de el le em m e en nt ts ss sc ce en na ar ri io o-b ba as se ed de el le em m e en nt ts scl ass di agr am s anal ysi s packages CRC m odel s col l abor at i on

    4、 di agr am s st at e di agr am s sequence di agr am sD D a at ta a/C Cl la as ss s D D e es si ig gn nA A r rc ch hi it te ec ct tu ur ra al l D D e es si ig gn nI In nt te er rf fa ac ce e D D e es si ig gn nC Co om m p po on ne en nt t-L Le ev ve el l D D e es si ig gn nDesi gn Model43 Characters

    5、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 a

    6、nd 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 architec

    7、tural 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

    8、,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 b

    9、etween 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

    10、 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 cha

    11、nge.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

    12、 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 af

    13、fect designnRefactoring(重构)a reorganization technique that simplifies the designnDesign Classesprovide design detail that will enable analysis classes to be implemented8Data Abstractionimplemented as a data structure9Procedural Abstractionimplemented with a knowledge of the object that is associated

    14、 with enter10ArchitectureStructural properties.Extra-functional properties.Families(族族)of related systems.11ArchitecturenIn the simplest form,architecture is the structure or organization of program components(modules),the manner in which these components interact,and the structure of data that are

    15、used by the components.nIn a broader sense,components can be generalized to represent major system elements and their interactions.12Modularitynmodularity is the single attribute of software that allows a program to be intellectually manageable.nMonolithic(整块庞大的)software(i.e.,a large program compose

    16、d of a single module)cannot be easily grasped()by a software engineer.nThe number of control paths,span of reference(引用跨度),number of variables,and overall complexity would make understanding close to impossible.nIn almost all instances,you should break the design into many modules,hoping to make und

    17、erstanding easier and as a consequence,reduce the cost required to build the software.13Modularity:number of modules 14Why Information Hiding?nreduces the likelihood of“side effects”nlimits the global impact of local design decisionsnemphasizes communication through interfacesndiscourages the use of

    18、 global datanleads to encapsulationan attribute of high quality designnresults in higher quality software15Information Hiding16Sizing Modules:Two ViewsMODULEWhats inside?How big is it?17Functional IndependencenFunctional independence is achieved by developing modules with single-minded function and

    19、an aversion to excessive interaction with other modules.nCohesion(内聚性)is an indication of the relative functional strength of a module.nA cohesive module performs a single task,requiring little interaction with other components in other parts of a program.Stated simply,a cohesive module should(ideal

    20、ly)do just one thing.nCoupling(耦合性)is an indication of the relative interdependence among modules.nCoupling depends 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.18AspectnAn aspect is a representation of

    21、a cross-cutting concern.(横切关注点:利用“横切”技术,剖开封装的对象内部,将那些影响多个类的公共行为封装成一个可重用对象,称为Aspect)。nConsider two requirements A and B.B crosscuts A if a software decomposition has been chosen in which A cannot be satisfied without taking B.nAOP(Aspect Oriented Programming)是OOP的补充和完善。n如:业务处理的主要流程是核心关注点,与之关系不大的部分是横切

    22、关注点,如权限认证、日志、事务处理等,可以将核心关注点和横切关注点分离开来。19显示更新的需求:显示更新的需求:无论图元何时移动、无论图元何时移动、移动到哪里,都要移动到哪里,都要通知屏幕管理器通知屏幕管理器(Display)其位)其位置发生了改变。置发生了改变。Aspect-Example20 采用采用OOPOOP,典型做法是在每个移动图元的操作代码中,插入一段通知,典型做法是在每个移动图元的操作代码中,插入一段通知Display其位置发生改变的代码,即:调用其位置发生改变的代码,即:调用Display.update()。Class Line private Point _p1,_p2;Po

    23、int getP1()return _p1;Point getP2()return _p2;void setP1(Point p1)this._p1=p1;Display.update();void setP2(Point p2)this._p2=p2;Display.update();Class Point private int _x1,_x2;int getX()return _x1;int getY()return _x2;void setX(int x1)this._x1=x1;Display.update();void setY(int x2)this._x2=x2;Display

    24、.update();Aspect-Example21Aspect DisplayUpdatingPointcut move():call(void Line.setP1(Point)|call(void Line.setP2(Point)|call(void Point.setX(int)|call(void Point.setY(int);after()returning:move()Display.update();Class Line private Point _p1,_p2;Point getP1()return _p1;Point getP2()return _p2;void se

    25、tP1(Point p1)this._p1=p1;void setP2(Point p2)this._p2=p2;Class Point private int _x1,_x2;int getX()return _x1;int getY()return _x2;void setX(int x1)this._x1=x1;void setY(int x2)this._x2=x2;采用采用AOPAOP,典型做法是在将所有移动图,典型做法是在将所有移动图元的代码封装成一个元的代码封装成一个Aspect:Aspect:DisplayUpdating。Aspect-Example22AspectAn Ex

    26、amplenConsider two requirements for the SafeHomeAssured WebApp.Requirement A is described via the use-case Access camera surveillance 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.Requireme

    27、nt B is a generic security requirement that states that a registered user must be validated prior to using SafeHomeAssured.This requirement 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

    28、*is a design representation for requirement B.Therefore,A*and B*are representations of concerns,and B*cross-cuts A*.nAn 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 SafeHomeAssured,i

    29、s an aspect of the SafeHome WebApp.23RefactoringnRefactoring 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.nWhen software is refactored,the existing design is examined for nredundancynunu

    30、sed design elementsninefficient or unnecessary algorithmsnpoorly constructed or inappropriate data structuresnany other design failure that can be corrected to yield a better design.24The Design Modelp p r ro o c ce es ss s d d i im m e en ns si io o n narchi tecture el em entsi nterface el em entsc

    31、om ponent-l evel el em entsdepl oym ent-l evel el em entsl owhi ghcl ass di agram s anal ysi s packages C RC m odel s col l aborati on di agram s use-cases-text use-case di agram s acti vi ty di agram s sw i m l ane di agram s col l aborati on di agram sdata fl ow di agram s control-fl ow di agram s

    32、 processi ng narrati vesdata fl ow di agram s control-fl ow di agram s processi ng narrati vesstate di agram s sequence di agram sstate di agram s sequence di agram sdesi gn cl ass real i zati ons subsystem s col l aborati on di agram s desi gn cl ass real i zati ons subsystem s col l aborati on di

    33、agram s refi nem ents to:depl oym ent di agram scl ass di agram s anal ysi s packages C RC m odel s col l aborati on di agram s com ponent di agram s desi gn cl asses acti vi ty di agram s sequence di agram srefi nem ents to:com ponent di agram s desi gn cl asses acti vi ty di agram s sequence di ag

    34、ram sdesi gn cl ass real i zati ons subsystem s col l aborati on di agram s com ponent di agram s desi gn cl asses acti vi ty di agram s sequence di agram sa a n n a a l ly y s si is s m m o o d d e e l ld d e e s si ig g n n m m o o d d e e l lRequi rem ents:constrai nts i nteroperabi l i ty target

    35、s and confi gurati ontechni cal i nterface desi gn N avi gati on desi gn G U I desi gn 25Design Model ElementsnData elementsnData model-data structuresnData model-database architecturenArchitectural elementsnApplication domainnAnalysis classes,their relationships,collaborations and behaviors are tra

    36、nsformed into design realizationsnInterface elementsnComponent elementsnDeployment elements26Architectural ElementsnThe architectural model is derived from three sources:ninformation about the application domain for the software to be built;nspecific requirements model elements such as data flow dia

    37、grams or analysis classes,their relationships and collaborations.nthe availability of architectural patterns.27Interface ElementsControl PanelLCDdi spl ay LEDi ndi cators keyPadCharacteri sti cs speaker wi rel essI nterface readKeyStroke()decodeKey()di spl ayStatus()l i ghtLEDs()sendControl M sg()Fi

    38、 gure 9.6 UM L i nterface representati on for C Co on nt tr ro ol lP Pa an ne el lKeyPadreadKeystroke()decodeKey()W i rel essPDAKeyPadM obi l ePhoneuser interface external interfaces to other systems,devices.-include checking and definitive information about the information is sent or received(3)int

    39、ernal interfaces between various design components.-an interface is a set of operations that describes some part of the behavior of a class and provides access to these operations.28Interface Elements29Component ElementsSensorManagementSensorn component-level design defines data structures for all l

    40、ocal data objects and algorithmic detail for all processing that occurs within a component and an interface that allows access to all component operations.30Deployment ElementsF i g u re 9.8 U M L d e p l o y m e n t d i a g ra m fo r S a fe H o m ePersonal com puterSecuri tyhom eM anagem entSurvei l l ancecom m uni cati onC o n tro l P a n e lC P I se rv e rSecuri tyhom eow nerA ccessexternal A ccessn Indicate how software functionality and subsystems will be allocated within the physical computing environment

    展开阅读全文
    提示  163文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
    关于本文
    本文标题:-软件工程实践者的研究方法课件.ppt
    链接地址:https://www.163wenku.com/p-3229245.html

    Copyright@ 2017-2037 Www.163WenKu.Com  网站版权所有  |  资源地图   
    IPC备案号:蜀ICP备2021032737号  | 川公网安备 51099002000191号


    侵权投诉QQ:3464097650  资料上传QQ:3464097650
       


    【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。

    163文库