cs 5150 so(ware engineering 3. examples of so(ware ... · cornell university compung and informaon...
TRANSCRIPT
CornellUniversity Compu1ngandInforma1onScience
CS5150So(wareEngineering3.Examplesofso(waredevelopmentprocesses
WilliamY.Arms
DefiniBons:AcBvityandSprint
Ac1vity
AnacBvityisageneraltermforanypartofaprojectthattakesplaceoverBme(alsoknownasatask)
• Eachstepintheso(waredevelopmentprocesscanbebrokendownintoseveralacBviBes.
Sprint
AsprintisasetperiodofBmeduringwhichateamcompletespartofaso(wareproject.
• Eachsprintwillgothroughmostoralloftheprocesssteps.
• Atypicalsprintmighthaveateamof6to8peopleworkingfor2to4weeks.
IteraBveRefinement
Concept •Createaprototypesystemearlyinthedevelopmentprocess. •Reviewtheprototypewithclientsandtestitwithusers,toimprovetheunderstandingoftherequirementsandclarifythedesign.
•RefinetheprototypeinaseriesofiteraBons. RequirementsarehardtounderstandunBlthereisanoperaBonalsystem,parBcularlywithuserinterfaces. Mistakesintherequirementsarethemostexpensivetocorrect. Example: •ConverBnganaBonalarchivefrompaperbasedtocomputerbased.
DiscussionofIteraBveRefinement
ThisisamediumweightprocesswithdocumentaBoncreatedduringtheprocess. IteraBverefinementusesvarioustechniquesthatenabletheclienttoreviewthetheplannedsystemearlyduringdevelopment: •Userinterfacemock-up •Throw-awayso(warecomponents •Dummymodules •Rapidprototyping •Successiverefinement Getsomethingworkingasquicklyaspossible,forclientanduserevaluaBon,butdonotreleaseit.
IteraBveRefinementwithaLargeSystem
OutlineDescripBon
Requirements
Design
ImplementaBon
IniBalVersion
IntermediateVersions
FinalVersion
Reviewmaybe
conBnuous
SpiralDevelopment
Spiraldevelopment•Createabasesystemthathastheoverallstructureofthefinalproductwithdummystubsformissingcomponents.
•Createacomprehensivesetoftestcasesforallcompletedcomponents
•Useasuccessionofsprintstodevelopneworimprovedcomponents,eachwithasetoftestcases.Addthesecomponentstothesourcecodelibrary.
•Onadailycycle,buildtheenBresystemfromthesourcecodelibraryandrunthecompletesetoftestcases.
Withspiraldevelopmentthereisalwaysafullytestedsystem,butthefuncBonalityisincomplete.
Example
DevelopinganewversionofanoperaBngsystem.
SpiralDevelopment
Newandimproved
components
Repeateveryday
Sourcecodelibrary
Testlibrary
BuildenBresystemfromsource
RunenBretestsuite
IncrementalReleaseofOnlineSystems
Whenso=wareisreleasedonlineitiso(enpossibletodividethedevelopmentintoasequenceofsprintsthataredevelopedandreleasedinquicksuccession. Example: •Start-upcompanydevelopingawebbasedshoppingservice.Advantages •Pay-backoninvestmentbeginssoon. •Requirementaremoreclearlyunderstoodindevelopingsubsequentsprints–minimizewaste.
•Feedbackfromcustomersandclientscanbeincorporatedinlaterphases.
ItiseasierforasmallteamtodevelopasmallsprintcorrectlythantocoordinatelargeprojectswithmanyramificaBons.
AgileDevelopment(OriginalVersionwithImmediateRelease)
• Theprojectisdividedintoalargenumberofsmalltasks,knownassprints. • Foreachsprint,ateamworksthroughafullso(waredevelopmentcycle
includingplanning,requirementsanalysis,design,coding,tesBng,andacceptancetesBng,andrelease.
• EachsprintiscompletedinafixedBmeperiod,e.g.,fourweeks. • Thesizeofansprintisbasedonteamsize,e.g.,5-10people.
Sprint1
Release Sprint1
Sprint2 Sprint3
Release Sprint2
Release Sprint3
DiscussionofAgileDevelopment
Varia1onsonagileso=waredevelopmentInpracBceitisrarelypossibleforeverysprinttoendwithreleasedso(ware,butso(waredevelopmentbasedonsprintshasmanyadvantages.Modernso(waredevelopmentincludesawiderangeofprocessesthatarecalled“agile”.Otherprocesseswithnamessuchas“heroicprogramming”or“scrum”usemanyofthesameconcepts.Characteris1cs• Developmentofaprojectisdividedintoalargenumberofsprints.• Eachsprintendswithfullytestedcode.• Thisisalightweightprocesswithminimaldocumentationcreatedduringthe
process.Ageneraldefini1on(fromWikipedia) Agileso(waredevelopmentdescribesasetofprinciplesforso(waredevelopmentunderwhichrequirementsandsoluBonsevolvethroughthecollaboraBveeffortofself-organizingcross-funcBonalteams.
AgileDevelopment
A(ereachsprintthecodemaybe:• released(originalagilemethod)• combinedwithcodefromothersprintsforsubsequentrelease• incorporatedintoalargercodebase(spiraldevelopment)
Sprint1
Testedcode
Sprint2 Sprint3
Testedcode
Testedcode
AgileDevelopment:Rework
Thechallengeofagiledevelopment Theagileapproachisexcellentforthedevelopmentorcontinualenhancementofasystemwithinanestablishedarchitecture. Ahigh-levelteammustestablishtheoverallarchitectureandcoordinatethesprints.ReworkWithagiledevelopmenttherequirementsanddesignoftheoverallsystememergeincrementally.• Inevitablypartsofsomeearlysprintswillneedtobereworked.• Thisrequireschangestocodethathasalreadybeenfullytestedandmayhavebeenreleased.Thisisalwaysawkward.
Ifthevolumeofreworkislarge,itismoreefficientnottofullypolisheachcomponent,buttouseiterativerefinementtominimizetheamountofrework.
SequenBalDevelopment:TheWaterfallModel
Requirements
Systemdesign
ProgramtesBng
OperaBon&maintenance
Programdesign
ImplementaBon(coding)
Acceptance&release
Requirements
Design
ImplementaBon
Feasibilitystudy
ThereareproblemswiththisbasicmodelanditisrarelyusedinpracBce.
DiscussionoftheWaterfallModel
ThewaterfallmodelisaheavyweightprocesswithfulldocumentaBonofeachprocessstep. Advantages: •Processvisibility •SeparaBonoftasks •Qualitycontrolateachstep •Costmonitoringateachstep Disadvantages: InpracBce,eachstageintheprocessrevealsnewunderstandingofthepreviousstages,whicho(enrequirestheearlierstagestoberevised. TheWaterfallModelisnotflexibleenough.
DiscussionoftheWaterfallModel
Apuresequen1almodelisimpossible Examples: • AfeasibilitystudycannotcreateaproposedbudgetandschedulewithoutapreliminarystudyoftherequirementsandatentaBvedesign.
• DetaileddesignandimplementaBonrevealgapsintherequirementsspecificaBon.
• Requirementsand/ortechnologymaychangeduringthedevelopment. TheplanmustallowforsomeformofiteraBon.
ModifiedWaterfallModel
Waterfallmodelwithfeedback ThisisbejerRequirements
Systemdesign
ProgramtesBng
OperaBon&maintenance
Programdesign
ImplementaBon(coding)
Acceptance&release
Feasibilitystudy
SequenBalDevelopment
SequenBalprocessesworkbestwhentherequirementsarewellunderstoodandthedesignisstraighkorward,e.g.,•Conversionsofmanualdataprocessingsystemswheretherequirementswerewellunderstoodandfewchangesweremadeduringthedevelopment(e.g.,electricitybilling).
•NewmodelsofaproductwherethefuncBonalityiscloselyderivedfromanearlierproduct(e.g.automaBcbrakingsystemforacar).
•PorBonsofalargesystemwheresomecomponentshaveclearlydefinedrequirementsandareclearlyseparatedfromtherestofthesystem.
Contracts
Noteaboutcontractsforso=waredevelopmentSomeorganizaBonscontractforso(waredevelopmentbyplacingseparatecontractsforeachstageoftheWaterfallModelorarrangeforpaymenta(ereachstage.ThisisaverybadpracBce.
MixedProcesses
InpracBce,manylargeprojectsuseprocessesthatmixaspectsofthefourtypesofso(wareprocess.Forexample:• Withspiraldevelopment,newcomponentsmaybedevelopedusinganyofthethreeothermethods.
• Userinterfaceshavetobetestedwithusers.ThisforcesiteraBvedevelopment,evenwithinanagileorsequenBalprocess.
MixedProcesses:PhasedDevelopment
Combinesequen1alanditera1veelementsAsimplesystemwithbasicfuncBonalityisbroughtquicklyintoproducBon(Phase1).ThissystemmaybedevelopedusingasequenBaloriteraBverefinement.Subsequentphasesarebasedonexperiencegainedfromusersofthepreviousphase.Advantages•Pay-backoninvestmentbeginssoon.•Requirementaremoreclearlyunderstoodwhendevelopingsubsequentphases
ExamplesofMixedProcesses:IteraBveRefinement+WaterfallModel
Problem:Addgraphicspackagetoaprogrammingenvironment Phase1:IteraBverefinement Makeseveralprototypeversionsbyextendingthecurrentenvironmentwithapreprocessorandrun-Bmesupportpackage.TestwithusersunBlusersarepleasedwithfuncBon.Throwthecodeaway. Phase2:Modifiedwaterfall UsetheresultsofPhase1tospecifyaformalsetofrequirements.Writenewcompilerandrun-BmesystemincorporaBnggraphicselements.Makeminoradjustmentstorequirementsasneeded.
CorporateProcesses
Largeso(waredevelopmentorganizaBonshavetheirowninternalprocessesthataredesignedfortheirneeds.Forexample: • Amazon.com(Internetcommerce)makesextensiveuseofsprints.Mostso(waredevelopmentisdividedintoincrementsofaboutfourweekselapsedBme.
• LockheedMarBn(governmentcontractor)followsasequenBalprocessthatfitswiththewaythattheUSgovernmentmanagesso(warecontracts.
• SAP(businessso(ware)emphasizesthefuncBonalitythatisseenbytheirbusinesscustomers.MuchofthedevelopmentissuitableforasequenBalprocess.
•Microso((PCso(ware)placesgreatemphasisontesBngwithaverywidevarietyofequipmentandbackwardcompaBbility.Muchofthedevelopmentusesaspiralprocess.
ChoosingaSo(wareProcess
Changesduringtheso(waredevelopmentprocessareexpensive. • Iftherequirementsarepoorlyunderstood,orexpectedtochange,selecta
processthatkeepsflexibility.IteraBverefinement,agilesprints,phasedimplementaBon.
• Ifabigso(waresystemhasmanyinter-relatedcomponents,avoidmajorchangestothedesignofasystemduringdevelopment.SequenBalprocess,suchasthemodifiedwaterfallmodel.
• Ifthemarketfortheso(wareispoorlyunderstood,useaprocessthatgetsoperaBonalso(wareinfrontofcustomersasquicklyaspossible.Incremental,agilesprints.
ObservaBonsaboutSo(wareProcesses
Completedprojectsshouldhaveincludedallthebasicprocesssteps but...thedevelopmentprocessisalwayspartlyevoluBonary. Riskisloweredby: • Prototypingkeycomponents • Frequentreleases,ordividinglargeprojectsintophases • EarlyandrepeatedtesBngwithusersandcustomers • Followingavisibleso(wareprocess • Makinguseofreusablecomponents Itisneverpossibletocompleteeachstepwithoutprovisionforrevision.Thisisknownasthrowingitoverthewall.
CS5150Projects:IteraBveRefinement
firstpresentaBon
thirdpresentaBon
secondpresentaBon
Requirements
Design
ImplementaBon
Review
Release
CS5150Project:AgileDevelopment
Sprint1
Testedcode
Sprint2 Sprint3
Testedcode
Testedcode
firstpresentaBon secondpresentaBon thirdpresentaBon
ForeachsprintaimtocompleteasecBonofthecode.