您好,欢迎访问三七文档
当前位置:首页 > 建筑/环境 > 工程监理 > 软件工程-实践者的研究方法 (3)
1Chapter3AgileDevelopmentSoftwareEngineering:APractitioner’sApproach,7/ebyRogerS.PressmanFornon-profiteducationaluseonlyMaybereproducedONLYforstudentuseattheuniversitylevelwhenusedinconjunctionwithSoftwareEngineering:APractitioner'sApproach,7/e.Anyotherreproductionoruseisprohibitedwithouttheexpresswrittenpermissionoftheauthor.2TheManifesto(宣言)forAgileSoftwareDevelopment“Weareuncoveringbetterwaysofdevelopingsoftwarebydoingitandhelpingothersdoit.Throughthisworkwehavecometovalue:•Individualsandinteractionsoverprocessesandtools•Workingsoftwareovercomprehensivedocumentation•Customercollaborationovercontractnegotiation•RespondingtochangeoverfollowingaplanThatis,whilethereisvalueintheitemsontheright,wevaluetheitemsontheleftmore.”KentBecketal3Whatis“Agility”?Effective(rapidandadaptive)responsetochangeEffectivecommunicationamongallstakeholdersOrganizingateamsothatitisincontroloftheworkperformedYielding…Rapid,incrementaldeliveryofsoftware传统软件开发方法:强调过程;强调文档;开发人员负担过重软件开发的新挑战:快速进入市场要求高生产率;快速变化的需求;快速发展的技术4AgilityandtheCostofChange5AnAgileProcessIsdrivenbycustomerdescriptionsofwhatisrequired(scenarios)Recognizesthatplansareshort-livedDevelopssoftwareiterativelywithaheavyemphasisonconstructionactivitiesDeliversmultiple‘softwareincrements’Adaptsaschangesoccur6AgilityPrinciples-I1.Ourhighestpriorityistosatisfythecustomerthroughearlyandcontinuousdeliveryofvaluablesoftware.2.Welcomechangingrequirements,evenlateindevelopment.Agileprocessesharnesschangeforthecustomer'scompetitiveadvantage.3.Deliverworkingsoftwarefrequently,fromacoupleofweekstoacoupleofmonths,withapreferencetotheshortertimescale.4.Businesspeopleanddevelopersmustworktogetherdailythroughouttheproject.5.Buildprojectsaroundmotivatedindividuals.Givethemtheenvironmentandsupporttheyneed,andtrustthemtogetthejobdone.6.Themostefficientandeffectivemethodofconveyinginformationtoandwithinadevelopmentteamisface–to–faceconversation.7AgilityPrinciples-II7.Workingsoftwareistheprimarymeasureofprogress.(可运行的软件是测量项目进展的主要依据)8.Agileprocessespromotesustainabledevelopment(敏捷过程提倡可持续的开发).Thesponsors,developers,andusersshouldbeabletomaintainaconstantpaceindefinitely.9.Continuousattentiontotechnicalexcellenceandgooddesignenhancesagility.10.Simplicity–theartofmaximizingtheamountofworknotdone–isessential.11.Thebestarchitectures,requirements,anddesignsemergefromself–organizingteams.12.Atregularintervals,theteamreflectson(反思)howtobecomemoreeffective,thentunesandadjustsitsbehavioraccordingly.8HumanFactorstheprocessmoldstotheneedsofthepeopleandteam,nottheotherwayaroundkeytraits(特征)mustexistamongthepeopleonanagileteamandtheteamitself:Competence(技能).Commonfocus.Collaboration.Decision-makingability.Fuzzyproblem-solvingability.Mutualtrustandrespect.Self-organization.9ExtremeProgramming(XP)Themostwidelyusedagileprocess,originallyproposedbyKentBeckXPPlanningBeginswiththecreationof“userstories”AgileteamassesseseachstoryandassignsacostStoriesaregroupedtoforadeliverableincrementAcommitment(承诺)ismadeondeliverydateAfterthefirstincrement“projectvelocity”isusedtohelpdefinesubsequentdeliverydatesforotherincrements10Userstories类似于usecases替代详细的用户需求规格说明书由用户书写,但不局限于界面的描述没有技术术语,能够成为验收测试的依据例如:描述买饮料过程的Userstory1.用户投入一些钱。2.售货机显示用户已经投了多少钱。3.如果投入的钱足够买某种饮料,这种饮料对应的按钮的灯就会亮。4.用户按了某个亮了的按钮。5.售货机卖出一罐饮料给他。6.售货机找零钱给他。11DeliverableincrementReleaseplanning计划向客户发布多个版本通过召开专门的会议releaseplanningmeeting来制订一份发布计划(发布计划详细描述用户各版本的要求)。对用户业务有重要影响的功能可在早期加入到系统中。越晚向用户介绍系统的总体特征,开发队伍所获得的完成时间越短。12ExtremeProgramming(XP)XPDesignFollowstheKISprinciple(keepitsimple)EncouragetheuseofCRCcards(Class-Responsibility-Collaboration)Fordifficultdesignproblems,suggeststhecreationof“spike(探针)solutions”—adesignprototypeEncourages“refactoring(重构)”—aniterativerefinementoftheinternalprogramdesign13SimplicityistheKey决不增加没有列入到进度中的功能设计只考虑当前定义的功能而不考虑以后需求的变化;该设计是完成目前功能所需的最简洁的设计。14CRCCardsClass,Responsibilities,andCollaboration(CRC)每个CRC卡片表示一个对象类,表明类名、责任和每个责任需要交互的其他类。CRC卡帮助Team交流设计思想,简化设计文档15Spikesolutions探针方案对不确定的需求和设计等,通过写一些可执行原型程序、进行详细设计或者演算等等方式做探测和尝试,以降低潜在的风险。这些探测过程称为SPIKE。16Refactor(重构)在不影响程序的外部行为的情况下,按“高内聚、低耦合”的原则对程序结构进行改进,优化设计结构,保持代码简洁、无冗余。17ExtremeProgramming(XP)XPCodingRecommendstheconstructionofaunittestforastorebeforecodingcommencesEncourages“pairprogramming”On-siteCustomerXPTestingAllunittestsareexecuteddaily“Acceptancetests”aredefinedbythecustomerandexcutedtoassesscustomervisiblefunctionality18PairProgramming所有发布的代码都由两个程序员在一台机器上共同开发。结对编程的最好方式是两人共同坐在显示器前,将键盘和鼠标在两人之间“滑动”,一人考虑所创建的方法,而另一人同时考虑该方法如何在类中得到更好的体现。19On-siteCustomer客户是Team成员,在开发现场和开发人员一起工作。传统的客户任务一般是提出需求,承担验收测试,接收发布的系统。XP新增加的任务:(1)写UserStory;(2)评估UserStory的商业优先级;(3)为每个UserStory定义验收测试;(4)计划开发内容;(5)调控开发过程。20ExtremeProgramming(XP)unittestcontinuousintegrationacceptancetestingpairprogrammingReleaseuserstoriesvaluesacceptancetestcriteriaiterationplansimpledesignCRCcardsspikesolutionsprototypesrefactoringsoftwareincrementprojectvelocitycomputed21Iteration根据交付计划和项目速率,选择要优先完成的userstory,将其分解为1~n天内完成的任务,制订本次迭代计划,然后通过每天的站立会议解决碰到的问题,调整迭代计划,会后是代码共享式的开发工作。开发人
本文标题:软件工程-实践者的研究方法 (3)
链接地址:https://www.777doc.com/doc-4007940 .html