欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > PPT文档下载  

    《敏捷软件开发》PPT课件.ppt

    • 资源ID:5518243       资源大小:1.46MB        全文页数:111页
    • 资源格式: PPT        下载积分:15金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    《敏捷软件开发》PPT课件.ppt

    敏捷软件开发,Agile Software Development,7/16/2023,Institute of Computer SoftwareNanjing University,1,摘要,IntroductionAgile Development Agile Design,7/16/2023,Institute of Computer SoftwareNanjing University,2,摘要,IntroductionAgile DevelopmentAgile Design,7/16/2023,Institute of Computer SoftwareNanjing University,3,Introduction,Robert C.Martin:“Agile Software Development Principles,Patterns,and Practices”,Prentice Hall(October 25,2002),7/16/2023,Institute of Computer SoftwareNanjing University,4,Jolt Award2003,Introduction,Robert C.Martin,7/16/2023,Institute of Computer SoftwareNanjing University,5,“Designing Object Oriented C+Applications using the Booch Method”,1995“Pattern Languages of Program Design 3”,1997,“More C+Gems”,1999,“Extreme Programming in Practice”,2003“UML for Java Programmers”,2003,Uncle Bob,Agile 敏捷,敏捷开发是一种面临迅速变化的需求快速开发软件的能力。提供必要的纪律和反馈的实践-practice保持软件灵活、可维护的设计原则-principle针对特定问题的设计模式-pattern适应变化和以人为中心,迭代、循序渐进,7/16/2023,Institute of Computer SoftwareNanjing University,6,The Agile Alliance 敏捷联盟,The Manifesto of the Agile Alliance 敏捷联盟宣言,2001,7/16/2023,Institute of Computer SoftwareNanjing University,7,We are uncovering better ways of developing softwareby doing it and helping others do it.Through this workwe have come to value:Individuals and interactions over processes and toolsWorking software over comprehensive documentationCustomer collaboration over contract negotiationResponding to change over following a plan,Kent Beck,Alistair Cockburn,Robert C.Martin,etc.,敏捷联盟宣言,个体和交互胜过过程和工具可以工作的软件胜过面面俱到的文档客户合作胜过合同谈判响应变化胜过遵循计划,7/16/2023,Institute of Computer SoftwareNanjing University,8,Principles,我们最优先要做的是通过尽早的、持续的交付有价值的软件来使客户满意。即使到了开发的后期,也欢迎改变需求。敏捷过程利用变化来为客户创造竞争优势。经常性地交付可以工作的软件,交付的间隔可以从几个星期到几个月,交付的时间间隔越短越好。,7/16/2023,Institute of Computer SoftwareNanjing University,9,Principles,在整个项目开发期间,业务人员和开发人员必须天天都在一起工作。围绕被激励起来的个体来构建项目。给他们提供所需的环境和支持,并且信任他们能够完成工作。在团队内部,最具有效果并富有效率的传递信息的方法,就是面对面的交谈。,7/16/2023,Institute of Computer SoftwareNanjing University,10,Principles,工作的软件是首要的进度度量标准。敏捷过程提倡可持续的开发速度。责任人、开发者和用户应该能够保持一个长期的、恒定的开发速度。不断地关注优秀的技能和好的设计会增强敏捷能力。,7/16/2023,Institute of Computer SoftwareNanjing University,11,Principles,简单使未完成的工作最大化的艺术是最根本的。最好的构架、需求和设计出于自组织团队。每隔一定时间,团队会在如何才能更有效地工作方面进行反省,然后相应地对自己的行为进行调整。,7/16/2023,Institute of Computer SoftwareNanjing University,12,Agile Processes,SCRUMCrystalFeature Driven Development 特征驱动软件开发Adaptive Software Development 自适应软件开发eXtreme Programming(XP)极限编程,7/16/2023,Institute of Computer SoftwareNanjing University,13,摘要,IntroductionAgile Development Agile DesignDesign Patterns,7/16/2023,Institute of Computer SoftwareNanjing University,14,Agile Development,Extreme Programming(XP,极限编程)是一种轻量级的软件开发方法,它使用快速的反馈,大量而迅速的交流,经过保证的测试来最大限度的满足用户的需求。XP强调用户满意,开发人员可以对需求的变化作出快速的反应。XP强调team work。项目管理者,用户,开发人员都处于同一个项目中,他们之间的关系不是对立的,而是互相协作的,具有共同的目标:提交正确的软件。,7/16/2023,Institute of Computer SoftwareNanjing University,15,Extreme Programming,XP强调4个因素:交流(communication),XP要求程序员之间以及和用户之间有大量而迅速的交流简单(simplicity),XP要求设计和实现简单和干净反馈(feedback),通过测试得到反馈,尽快提交软件并根据反馈修改勇气(courage),勇敢的面对需求和技术上的变化,7/16/2023,Institute of Computer SoftwareNanjing University,16,Extreme Programming,XP特别适用于需求经常改变的领域,客户可能对系统的功能并没有清晰的认识,可能系统的需求经常需要变动。XP也适用于风险比较高的项目,当开发人员面对一个新的领域或技术时,XP可以帮助减低风险XP适用于小的项目(人员上),人员在2-12人之间,XP不适用于人员太多的项目,7/16/2023,Institute of Computer SoftwareNanjing University,17,Practices of XP,客户作为团队成员用户素材 user stories短周期交付迭代计划发布计划验收测试结对编程 pair programming,7/16/2023,Institute of Computer SoftwareNanjing University,18,Practices of XP,测试驱动的开发方法 Test-Driven Development集体所有权持续集成可持续的开发速度开放的工作空间计划游戏 planning game简单的设计重构 Refactoring隐喻 Metaphor:将整个系统联系在一起的全局视图,7/16/2023,Institute of Computer SoftwareNanjing University,19,摘要,IntroductionAgile Development Agile Design,7/16/2023,Institute of Computer SoftwareNanjing University,20,7/16/2023,Institute of Computer SoftwareNanjing University,21,What is Design?,“After reviewing the software development life cycle as I understood it,I concluded that the only software documentation that actually seems to satisfy the criteria of an engineering design is the source code listings.”-Jack Reeves,7/16/2023,Institute of Computer SoftwareNanjing University,22,Design Smells,Rigidity 僵化性 难于修改Fragility 脆弱性 一改便乱Immobility 牢固性 难于重用Viscosity 粘滞性 做好事难Needless Complexity 不必要的复杂性Needless Repetition 不必要的重复Opacity 晦涩性,7/16/2023,Institute of Computer SoftwareNanjing University,23,The“Copy”Program,Initial Design,void copy()int c;while(c=RdKbd()!=EOF)WrtPrt(c);,7/16/2023,Institute of Computer SoftwareNanjing University,24,Requirement changes,bool ptFlag=false;/remember to reset this flagvoid Copy()int c;while(c=(ptFlag?RdPt():RdKbd()!=EOF)WrtPrt(c);,7/16/2023,Institute of Computer SoftwareNanjing University,25,Requirement changes again!,bool ptFlag=false;bool punchFlag=false/remember to reset these flagsvoid Copy()int c;while(c=(ptFlag?RdPt():RdKbd()!=EOF)punchFlag?WrtPunch(c):WrtPrt(c);,7/16/2023,Institute of Computer SoftwareNanjing University,26,Agile design of the“copy”example,int RdKbd();void WrtPrt(int);const int EOF=-1;class Reader public:virtual int read()=0;class KeyboardReader:public Reader public:virtual int read()return RdKbd();KeyboardReader GdefaultReader;void Copy(reader,7/16/2023,Institute of Computer SoftwareNanjing University,27,Agile developers,Knew what to do becauseDetect the problem by following agile practices;Diagnose the problem by applying design principlesSolve the problem by applying the appropriate design patternThe interplay between these three aspects of software development is the act of design.,A more complex example:Multi-panel interactive systems,问题简单方案结构化的方案面向对象的方案讨论,7/16/2023,Institute of Computer SoftwareNanjing University,28,28,Multi-panel interactive systems,问题:业务流程每个会话(session)须经历多个步骤当前步骤显示panel(对话框),获取用户输入(选择),若输入错,给提示,直至正确;依据输入进行处理并转入下一步骤(转入哪个步骤可能依赖于用户的输入);对话界面例如航空订票,7/16/2023,Institute of Computer SoftwareNanjing University,29,29,Institute of Computer SoftwareNanjing University,30,16-Jul-23,Institute of Computer SoftwareNanjing University,7/16/2023,Institute of Computer SoftwareNanjing University,31,状态转换图,设计要点,图可能很大图可能变化要考虑复用,7/16/2023,Institute of Computer SoftwareNanjing University,32,32,软件设计之难在于多种(可能冲突)的需求之间的均衡取舍,A Simple-minded solution,7/16/2023,Institute of Computer SoftwareNanjing University,33,33,A Simple-minded solution,7/16/2023,Institute of Computer SoftwareNanjing University,34,问题“Goto”!本质:转换图结构分散地hardwired到各个模块的算法中若增加状态或改动流程?如何复用?,34,A functional,top-down solution,好,我们消除goto,并将流程独立出来,放到一个函数中transition(state,choice),7/16/2023,Institute of Computer SoftwareNanjing University,35,35,7/16/2023,Institute of Computer SoftwareNanjing University,36,7/16/2023,Institute of Computer SoftwareNanjing University,37,Top-down decomposition,7/16/2023,Institute of Computer SoftwareNanjing University,38,The top,7/16/2023,Institute of Computer SoftwareNanjing University,39,Critique,7/16/2023,Institute of Computer SoftwareNanjing University,40,7/16/2023,Institute of Computer SoftwareNanjing University,41,Fragileness,7/16/2023,Institute of Computer SoftwareNanjing University,42,42,增加状态怎样?,如何在不同应用间复用?,object-oriented architecture,Law of inversionIf your routines exchange too many data,put your routines in your data.,7/16/2023,Institute of Computer SoftwareNanjing University,43,State as a class,7/16/2023,Institute of Computer SoftwareNanjing University,44,7/16/2023,Institute of Computer SoftwareNanjing University,45,Use inheritance and deferred class,7/16/2023,Institute of Computer SoftwareNanjing University,46,7/16/2023,47,7/16/2023,Institute of Computer SoftwareNanjing University,48,7/16/2023,Institute of Computer SoftwareNanjing University,49,7/16/2023,Institute of Computer SoftwareNanjing University,50,7/16/2023,Institute of Computer SoftwareNanjing University,51,7/16/2023,Institute of Computer SoftwareNanjing University,52,The system?An ADT,not a“main”function,7/16/2023,Institute of Computer SoftwareNanjing University,53,7/16/2023,Institute of Computer SoftwareNanjing University,54,16-Jul-23,Institute of Computer SoftwareNanjing University,54,7/16/2023,Institute of Computer SoftwareNanjing University,55,7/16/2023,Institute of Computer SoftwareNanjing University,56,7/16/2023,Institute of Computer SoftwareNanjing University,57,讨论,Focus on data abstraction“Forget”the“main”function of the system,resist the constant temptation to ask“What does the system do?”Law of inversionRealworldliness is not a significant difference between OO and other approaches;what counts is how we model the world,7/16/2023,Institute of Computer SoftwareNanjing University,58,7/16/2023,Institute of Computer SoftwareNanjing University,59,摘要,IntroductionAgile DevelopmentAgile Designdesign principlesDesign Patterns,7/16/2023,Institute of Computer SoftwareNanjing University,60,Design Principles,SRP(The Single-Responsibility Principle)单一职责原则OCP(The Open-Closed Principle)开放-封闭原则LSP(The Liskov Substitution Principle)Liskov替换原则DIP(The Dependency-Inversion Principle)依赖倒置原则ISP(The Interface-Segregation Principle)接口隔离原则,7/16/2023,Institute of Computer SoftwareNanjing University,61,SRP 单一职责原则,A class should have only one reason to change.就一个类而言,应该仅有一个引起它变化的原因。What is a Responsibility?A reason for change 变化的原因。每个职责都是变化的一个轴线,当需求变化时,该变化会反映为职责的变化。An axis of change is an axis of change only if the changes actually occur.变化的轴线仅当变化实际发生时才具有真正的意义。,7/16/2023,Institute of Computer SoftwareNanjing University,62,Example,7/16/2023,Institute of Computer SoftwareNanjing University,63,Example:applying SRP,7/16/2023,Institute of Computer SoftwareNanjing University,64,Example:SRP violation,interface Modem public void dial(String pno);public void hangup();public void send(char c);public char recv();,connectionmanagement,datacommunication,7/16/2023,Institute of Computer SoftwareNanjing University,65,Example,Separated modem interface,7/16/2023,Institute of Computer SoftwareNanjing University,66,OCP 开放-封闭原则,Software entities(classes,modules,functions,etc.)should be open for extension,but closed for modification.软件实体(类、模块、函数等)应该是可以扩展的,但是不可修改的。OCP is the heart of OO design!,7/16/2023,Institute of Computer SoftwareNanjing University,67,OCP Description,Two primary attributes:Open for extension:the behavior of the module can be extendedClosed for modification:extending the behavior of a module does not result in changes to the source or binary code of the module.本质:不改源码,改行为Is it possible?,7/16/2023,Institute of Computer SoftwareNanjing University,68,Abstraction is the key!,Client is neither open nor closed,7/16/2023,Institute of Computer SoftwareNanjing University,69,Strategy Pattern,Client is both open and closed,7/16/2023,Institute of Computer SoftwareNanjing University,70,Template Method Pattern,A clear separation of generic functionality from the detailed implementation of that functionality,Heuristics,OCP是面向对象设计的核心所在!灵活性、可重用性、可维护性使用OOPL不代表遵循了OCP肆意抽象亦不是一个好主意100%的封闭不可能,必须有策略地对待这个问题。对程序中呈现出频繁变化的那些部分做出抽象,拒绝不成熟的抽象和抽象本身一样重要。,7/16/2023,Institute of Computer SoftwareNanjing University,71,7/16/2023,Institute of Computer SoftwareNanjing University,72,LSP:Liskov替换原则,Subtypes must be substitutable for their base types.子类型必须能够替换掉它们的基类型。If for each object o1 of type S there is an object o2 of type T such that for all programs P defined in terms of T,the behavior of P is unchanged when o1 is substituted for o2 then S is a subtype of T.Liskov88 若对每个类型S的对象o1,都存在一个类型T的对象o2,使得在所有针对T编写的程序P中,用o1代替o2后,程序P行为功能不变,则S是T的子类型。,7/16/2023,Institute of Computer SoftwareNanjing University,73,LSP Violation(I),struct Shape enum ShapeType square,circle itsType;Shape(ShapeType t):itsType(t);struct Circle:public Shape Circle():Shape(circle);void Draw()const;struct Square:public Shape Square():Shape(circle);void Draw()const;,void DrawShape(const Shape&s)if(s.itsType=Shape:square)static_cast(s).draw()else if(s.itsType=Shape:circle)static_cast(s).draw(),RTTI(运行时类型识别),7/16/2023,Institute of Computer SoftwareNanjing University,74,LSP Violation(II),class Rectangle public:void SetWidth(double w)itsWidth=w;void SetHeight(double h)itsHeight=h;private:double itsWidth;double itsHeight;,IS-A Relationship,7/16/2023,Institute of Computer SoftwareNanjing University,75,LSP Violation(II),void Square:SetWidth(double w)Rectangle:SetWidth(w);Rectangle:SetHeight(w):void Square:SetHeight(double w)Rectangle:SetWidth(w);Rectangle:SetHeight(w):,void f(Rectangle/call Rectangle:SetWidth,:Square,Violated!,7/16/2023,Institute of Computer SoftwareNanjing University,76,LSP Violation(II),class Rectangle public:virtual void SetWidth(double w)itsWidth=w;virtual void SetHeight(double h)itsHeight=h;private:double itsWidth;double itsHeight;,Are Rectangle and Square self-consistent?,void g(Rectangle,:Square,True or false?,Violated!,7/16/2023,Institute of Computer SoftwareNanjing University,77,The real problem,Validity is not intrinsic!有效性并非本质属性模型的有效性只能通过它的客户程序来表现。IS-A is about Behavior Behaviorally,a Square is not a Rectangle.Recall DbC principle about inheritancePrecondition 更弱;Postcondition 更强,The real problem,Rectangle:SetWidth(double w)的后置条件Postcond:(itsWidth=w)&(itsHeight=old.itsHeight)但是Square:SetWidth(double w)不能满足该条件可以通过编写单元测试的方法来指定契约,7/16/2023,Institute of Computer SoftwareNanjing University,78,7/16/2023,Institute of Computer SoftwareNanjing University,79,Heuristics and Conventions,Violation 1:Degenerate functions in derivatives 派生类中的退化函数Violation 2:Throwing exceptions from derivatives 从派生类中抛出异常,public class Base public void f()/*some code*/Public class Derived extends Base public void f(),7/16/2023,Institute of Computer SoftwareNanjing University,80,LSP,One of the enablers of the OCP。LSP是使OCP成为可能的主要原则之一。It is the substitutability of subtypes that allows a module,expressed in terms of a base type,to be extensible without modification.正是子类型的可替换性才使得使用基类类型的模块在无需修改的情况下就可以扩展。,7/16/2023,Institute of Computer SoftwareNanjing University,81,DIP 依赖倒置原则,High level modules should not depend on low-level modules.Both should depend on abstractions.高层模块不应该依赖于低层模块,二者都应该依赖于抽象。Abstractions should not depend on details.Details should depend on abstractions.抽象不应该依赖于细节,细节应该依赖于抽象。Inversion:相对于结构化方法而言,Booch:“all well structured OO architectures have clearly defined layers,with each layer providing some coherent set of services through a well-defined and controlled interface.”,Laying,7/16/2023,Institute of Computer SoftwareNanjing University,Unfortunate!,Laying,7/16/2023,Institute of Computer SoftwareNanjing University,83,Inverted layers,also an inversion of interface ownership:客户拥有抽象接口,服务者则从这些抽象接口派生。,Hollywood principle:“dont call us,well call you.”低层模块实现在高层模块中声明并被高层模块调用的接口。,7/16/2023,Institute of Computer SoftwareNanjing University,84,Heuristic,“Depend on abstractions”依赖于抽象不应该依赖于具体类程序中所有的依赖关系都应该终止于抽象类或者接口According to it:任何变量都不应该持有一个指向具体类的指针或引用任何类都不应该从具体类派生任何方法都不应该覆写它的任何基类中的已经实现了的方法例外:可以依赖稳定的具体类,比如String,7/16/2023,Institute of Computer SoftwareNanjing University,85,DIP,依赖关系的倒置正是好的面向对象设计的标志所在。如果程序的依赖关系是倒置的,它就是面向对象的设计,否则就是过程化的设计。DIP是实现许多OO技术所宣称的好处的基本低层机制。它的正确应用对于创建可重用的框架来说是必须的。,7/16/2023,Institute of Computer SoftwareNanjing University,86,ISP

    注意事项

    本文(《敏捷软件开发》PPT课件.ppt)为本站会员(小飞机)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开