Lect3:软件工程最佳实践.ppt_第1页
Lect3:软件工程最佳实践.ppt_第2页
Lect3:软件工程最佳实践.ppt_第3页
Lect3:软件工程最佳实践.ppt_第4页
Lect3:软件工程最佳实践.ppt_第5页
已阅读5页,还剩130页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

BestPracticesofSoftwareEngineering SymptomsofSoftwareDevelopmentProblems UserorbusinessneedsnotmetRequirementsnotaddressedModulesnotintegratingDifficultieswithmaintenanceLatediscoveryofflawsPoorqualityofend userexperiencePoorperformanceunderloadNocoordinatedteameffortBuild and releaseissues TraceSymptomstoRootCauses NeedsnotmetRequirementschurnModulesdon tfitHardtomaintainLatediscoveryPoorqualityPoorperformanceCollidingdevelopersBuild and release InsufficientrequirementsAmbiguouscommunicationsBrittlearchitecturesOverwhelmingcomplexityUndetectedinconsistenciesPoortestingSubjectiveassessmentWaterfalldevelopmentUncontrolledchangeInsufficientautomation Symptoms RootCauses BestPractices AmbiguouscommunicationsUndetectedinconsistencies DevelopIterativelyManageRequirementsUseComponentArchitecturesModelVisually UML ContinuouslyVerifyQualityManageChange Modulesdonotfit BestPracticesReinforceEachOther BestPractices DevelopIterativelyManageRequirementsUseComponentArchitecturesModelVisually UML ContinuouslyVerifyQualityManageChange Validatesarchitecturaldecisionsearlyon Addressescomplexityofdesign implementationincrementally Measuresqualityearlyandoften Evolvesbaselinesincrementally Ensuresusersareinvolvedasrequirementsevolve DevelopIteratively Iterativedevelopmentproducesanexecutable 1 InitialPlanning 2 Planning 3 Requirements 4 Analysis Design 5 Implementation 7 Deployment 6 Test 8 Evaluation ManagementEnvironment on going ManagingRequirements Ensuresthatyousolvetherightproblembuildtherightsystembytakingasystematicapproachtoelicitingorganizingdocumentingmanagingthechangingrequirementsofasoftwareapplication UseComponentArchitectures Softwarearchitectureneedstobe PurposeofaComponent BasedArchitecture BasisforreuseComponentreuseArchitecturereuseBasisforprojectmanagementPlanningStaffingDeliveryIntellectualcontrolManagecomplexityMaintainintegrity Component basedarchitecturewithlayers ModelVisually UML CapturesstructureandbehaviorShowshowsystemelementsfittogetherKeepsdesignandimplementationconsistentHidesorexposesdetailsasappropriatePromotesunambiguouscommunicationTheUMLprovidesonelanguageforallpractitioners VisualModelingwiththeUnifiedModelingLanguage DynamicDiagrams MultipleviewsPrecisesyntaxandsemantics ContinuouslyVerifyQuality Cost Transition Construction Elaboration Inception Softwareproblemsare100to1000timesmorecostlytofindandrepairafterdeployment CosttoRepairSoftwareCostofLostOpportunitiesCostofLostCustomers TestingDimensionsofQuality Performance Reliability Testthattheapplicationbehavesconsistentlyandpredictably Testtheonlineresponseunderaverageandpeakloading Functionality Testtheaccurateworkingsofeachusagescenario Usability Testapplicationfromtheperspectiveofconveniencetotheenduser Supportability Testtheabilitytomaintainandsupporttheapplicationunderproductionuse WorkspaceManagement ProcessIntegration ParallelDevelopment BuildManagement ManageChange Toavoidconfusion have SecureworkspacesforeachdeveloperAutomatedintegration buildmanagementParalleldevelopment ManageChange continued UnifiedChangeManagement UCM involves ManagementacrossthelifecycleSystemProjectmanagementActivity basedmanagementTasksDefectsEnhancementsProgresstrackingChartsReports DevelopIterativelyManageRequirementsUseComponentArchitecturesModelVisually UML ContinuouslyVerifyQualityManageChange RationalUnifiedProcessImplementsBestPractices BestPracticesProcessMadePractical AchievingBestPractices IterativeapproachGuidanceforactivitiesandartifactsProcessfocusonarchitectureUsecasesthatdrivedesignandimplementationModelsthatabstractthesystem ATeam BasedDefinitionofProcess AprocessdefinesWhoisdoingWhat When andHow inordertoreachacertaingoal Neworchangedrequirements Neworchangedsystem SoftwareEngineeringProcess ProcessStructure LifecyclePhases TheRationalUnifiedProcesshasfourphases Inception DefinethescopeoftheprojectElaboration Plantheproject specifyfeaturesandbaselinearchitectureConstruction BuildtheproductTransition Transitiontheproductintotheend usercommunity Time BringingItAllTogether TheIterativeApproach Summary BestPracticesguidesoftwareengineeringbyaddressingrootcauses BestPracticesreinforceeachother Processguidesateamonwhodoeswhat when andhow TheRationalUnifiedProcessisameansofachievingBestPractices MasteringObject OrientedAnalysisandDesignwithUMLModule2 PrinciplesofVisualModeling Objectives DescribetheimportanceofvisualmodelingandtheroleofModelDrivenArchitecture Definethefourprinciplesofvisualmodeling ExplainwhattheUnifiedModelingLanguage UML represents DefinethetypeofprocessthatbestrelatestotheUML WhereAreWe Whatismodeling FourprinciplesofvisualmodelingTheUMLProcessandvisualmodeling WhatIsaModel Amodelisasimplificationofreality WhyModel Modelingachievesfouraims Helpsyoutovisualizeasystemasyouwantittobe Permitsyoutospecifythestructureorbehaviorofasystem Givesyouatemplatethatguidesyouinconstructingasystem Documentsthedecisionsyouhavemade Youbuildmodelsofcomplexsystemsbecauseyoucannotcomprehendsuchasysteminitsentirety Youbuildmodelstobetterunderstandthesystemyouaredeveloping TheImportanceofModeling PaperAirplane FighterJet LessImportant MoreImportant SoftwareTeamsOftenDoNotModel ManysoftwareteamsbuildapplicationsapproachingtheproblemliketheywerebuildingpaperairplanesStartcodingfromprojectrequirementsWorklongerhoursandcreatemorecodeLacksanyplannedarchitectureDoomedtofailureModelingisacommonthreadtosuccessfulprojects ModelDrivenArchitecture MDA AnapproachtousingmodelsinsoftwaredevelopmentSeparatethespecificationoftheoperationofasystemfromthedetailsofthewaythatsystemusesthecapabilitiesofitsplatform specifyingasystemindependentlyoftheplatformthatsupportsitspecifyingplatformschoosingaparticularplatformforthesystemtransformingthesystemspecificationintooneforaparticularplatform MDAViewpoints ComputationalIndependentModel CIM FocusisonenvironmentofthesystemandrequirementsforthesystemPlatformIndependentModel PIM Focusisonsystemoperation independentofplatformPlatformSpecificModel PSM Focusisondetailedusageofsystemonspecificplatform Whatismodeling FourprinciplesofvisualmodelingTheUMLProcessandvisualmodeling WhereAreWe FourPrinciplesofModeling Themodelyoucreateinfluenceshowtheproblemisattacked Everymodelmaybeexpressedatdifferentlevelsofprecision Thebestmodelsareconnectedtoreality Nosinglemodelissufficient Principle1 TheChoiceofModelisImportant Themodelsyoucreateprofoundlyinfluencehowaproblemisattackedandhowasolutionisshaped Insoftware themodelsyouchoosegreatlyaffectyourworldview Eachworldviewleadstoadifferentkindofsystem Principle2 LevelsofPrecisionMayDiffer Everymodelmaybeexpressedatdifferentlevelsofprecision Thebestkindsofmodelsletyouchooseyourdegreeofdetail dependingon Whoisviewingthemodel Whytheyneedtoviewit ViewforDesigners ViewforCustomers Principle3 TheBestModelsAreConnectedtoReality Allmodelssimplifyreality Agoodmodelreflectspotentiallyfatalcharacteristics Principle4 NoSingleModelIsSufficient Nosinglemodelissufficient Everynon trivialsystemisbestapproachedthroughasmallsetofnearlyindependentmodels Createmodelsthatcanbebuiltandstudiedseparately butarestillinterrelated ProcessView DeploymentView LogicalView Use CaseView ImplementationView End user Functionality Programmers Softwaremanagement Performance scalability throughput Systemintegrators Systemtopology delivery installation communication Systemengineering Analysts Designers Structure Whatismodeling FourprinciplesofvisualmodelingTheUMLProcessandvisualmodeling WhereAreWe WhatIstheUML TheUMLisalanguageforVisualizingSpecifyingConstructingDocumentingtheartifactsofasoftware intensivesystem TheUMLIsaLanguageforVisualizing Communicatingconceptualmodelstoothersispronetoerrorunlesseveryoneinvolvedspeaksthesamelanguage Therearethingsaboutasoftwaresystemyoucan tunderstandunlessyoubuildmodels Anexplicitmodelfacilitatescommunication TheUMLIsaLanguageforSpecifying TheUMLbuildsmodelsthatareprecise unambiguous andcomplete TheUMLIsaLanguageforConstructing UMLmodelscanbedirectlyconnectedtoavarietyofprogramminglanguages MapstoJava C VisualBasic andsoonTablesinaRDBMSorpersistentstoreinanOODBMSPermitsforwardengineeringPermitsreverseengineering TheUMLIsaLanguageforDocumenting UseCaseDiagram ClassDiagram SequenceDiagram TheUMLaddressesdocumentationofsystemarchitecture requirements tests projectplanning andreleasemanagement DeploymentDiagram HistoryoftheUML UMLPartners Expertise UML1 0 Jan 97 UML1 1 Sept 97 UML1 5 March 03 UML2 0 2004 OtherMethods Booch 91 OMT 1 OOSE Booch 93 OMT 2 PublicFeedback UnifiedMethod0 8 OOPSLA 95 InputstotheUML Fusion Operationdescriptions messagenumbering Beforeandafterconditions Meyer Harel Statecharts Wirfs Brock Responsibilities Embley Singletonclasses High levelview Odell Classification Objectlifecycles Shlaer Mellor Gamma et al Frameworks patterns notes Booch Rumbaugh Jacobson Selic Gullekson Ward ROOM Real TimeObject OrientedModeling Whatismodeling FourprinciplesofvisualmodelingTheUMLProcessandvisualmodeling WhereAreWe ALanguageIsNotEnoughtoBuildaSystem Modeling Language Unified Process Team Based Development WhatTypeofProcessMostBenefitstheUML TheUMLislargelyprocessindependent AprocessfullybenefitsfromtheUMLwhentheprocessis Use casedrivenArchitecturecentricIterativeandincremental AUse CaseDrivenProcess Usecasesdefinedforasystemarethebasisfortheentiredevelopmentprocess Benefitsofusecases Concise simple andunderstandablebyawiderangeofstakeholders Helpsynchronizethecontentofdifferentmodels WithdrawMoney Customer CheckBalance AnArchitecture CentricProcess Asystem sarchitectureisusedasaprimaryartifactforconceptualizing constructing managing andevolvingthesystemunderdevelopment Benefits Intellectualcontroloveraprojecttomanageitscomplexityandtomaintainsystemintegrity Effectivebasisforlarge scalereuse Abasisforprojectmanagement Assistanceincomponent baseddevelopment AnIterativeandIncrementalProcess Criticalrisksareresolvedbeforemakinglargeinvestments Initialiterationsenableearlyuserfeedback Testingandintegrationarecontinuous Objectivemilestonesfocusontheshortterm Progressismeasuredbyassessingimplementations Partialimplementationscanbedeployed IterativeDevelopment Earliestiterationsaddressgreatestrisks Eachiterationproducesanexecutablerelease anadditionalincrementofthesystem Eachiterationincludesintegrationandtest TIME Iteration1 Iteration2 Iteration3 Review Whatisamodel WhataretheviewpointsofMDA Describeeachone Whatarethefourprinciplesofmodeling Describeeachone WhatistheUML Describeeachofitsfourbenefits WhatprocesscharacteristicsbestfittheUML Describeeachcharacteristic Whatisaniteration MasteringObject OrientedAnalysisandDesignwithUMLModule3 ConceptsofObjectOrientation Objectives ConceptsofObjectOrientation ExplainthebasicprinciplesofobjectorientationDefinethebasicconceptsandtermsofobjectorientationandtheassociatedUMLnotation Review WhyModel Modelingachievesfouraims Helpsyoutovisualizeasystemasyouwantittobe Permitsyoutospecifythestructureorbehaviorofasystem Givesyouatemplatethatguidesyouinconstructingasystem Documentsthedecisionsyouhavemade Youbuildmodelsofcomplexsystemsbecauseyoucannotcomprehendsuchasysteminitsentirety Youbuildmodelstobetterunderstandthesystemyouaredeveloping FourPrinciplesofModeling Themodelyoucreateinfluenceshowtheproblemisattacked Everymodelmaybeexpressedatdifferentlevelsofprecision Thebestmodelsareconnectedtoreality Nosinglemodelissufficient Review BasicPrinciplesofObjectOrientation Abstraction Hierarchy ObjectOrientation Encapsulation Modularity Review Example Abstraction Student Professor CourseOffering 9 00AM Monday Wednesday Friday Course e g Algebra Review EncapsulationIllustrated ProfessorClarkneedstobeabletoteachfourclassesinthenextsemester SubmitFinalGrades AcceptCourseOffering TakeSabbatical ProfessorClark SetMaxLoad Name JClarkEmployeeID 567138HireDate 07 25 1991Status TenuredDiscipline FinanceMaxLoad 4 SetMaxLoad 4 Review Example Modularity Forexample breakcomplexsystemsintosmallermodules Review Example Hierarchy Decreasingabstraction Increasingabstraction Asset RealEstate Savings BankAccount Checking Stock Security Bond Elementsatthesamelevelofthehierarchyshouldbeatthesamelevelofabstraction Review WhatIsanObject Anobjectisanentitywithawell definedboundaryandidentitythatencapsulatesstateandbehavior Stateisrepresentedbyattributesandrelationships Behaviorisrepresentedbyoperations methods andstatemachines Object Operations Attributes Review WhatIsaClass Aclassisadescriptionofasetofobjectsthatsharethesameattributes operations relationships andsemantics Anobjectisaninstanceofaclass AclassisanabstractioninthatitEmphasizesrelevantcharacteristics Suppressesothercharacteristics Class attribute operation Review RepresentingClassesintheUML Aclassisrepresentedusingarectanglewithcompartments ProfessorJClark Professor name employeeID UniqueID hireDate status discipline maxLoad submitFinalGrade acceptCourseOffering setMaxLoad takeSabbatical teachClass Review TheRelationshipBetweenClassesandObjects Aclassisanabstractdefinitionofanobject Itdefinesthestructureandbehaviorofeachobjectintheclass Itservesasatemplateforcreatingobjects Classesarenotcollectionsofobjects ProfessorMeijer ProfessorAllen ProfessorTorpie Professor Review ClassRelationships Thesemanticconnectionbetweenclasses GradyBoochClassdiagramsmaycontainthefollowingrelationships AssociationAggregationCompositionGeneralizationDependencyRealization OR OR OR WhatIsNavigability Indicatesthatitispossibletonavigatefromaassociatingclasstothetargetclassusingtheassociation RegistrationController CourseOffering Schedule Review WhatIsanAssociation ThesemanticrelationshipbetweentwoormoreclassifiersthatspecifiesconnectionsamongtheirinstancesAstructuralrelationship specifyingthatobjectsofonethingareconnectedtoobjectsofanother Course Student Schedule Review WhatIsMultiplicity MultiplicityisthenumberofinstancesoneclassrelatestoONEinstanceofanotherclass Foreachassociation therearetwomultiplicitydecisionstomake oneforeachendoftheassociation ForeachinstanceofProfessor manyCourseOfferingsmaybetaught ForeachinstanceofCourseOffering theremaybeeitheroneorzeroProfessorastheinstructor Professor CourseOffering 0 1 0 instructor Review MultiplicityIndicators 2 4 0 1 1 0 1 2 4 6 Unspecified ExactlyOne ZeroorMore ZeroorOne optionalscalarrole OneorMore SpecifiedRange Multiple DisjointRanges ZeroorMore Review WhatIsAggregation Anaggregationisaspecialformofassociationthatmodelsawhole partrelationshipbetweenanaggregate thewhole anditsparts Anaggregationisan Isapart of relationship Multiplicityisrepresentedlikeotherassociations Schedule Student 0 1 1 WhatIsComposition Acompositionisastrongerformofassociationinwhichthecompositehassoleresponsibilityformanagingitsparts suchastheirallocationanddeallocation Itisshownbyadiamondfilledadornmentontheoppositeend Schedule Student 0 1 WhatisaStructuredClass AstructuredclasscontainspartsorrolesthatformitsstructureandrealizeitsbehaviorDescribestheinternalimplementationstructureThepartsthemselvesmayalsobestructuredclassesAllowshierarchicalstructuretopermitaclearexpressionofmultilevelmodels AconnectorisusedtorepresentanassociationinaparticularcontextRepresentscommunicationspathsamongparts StructuredClassNotation Apartorroleisshownbyusingthesymbolforaclass arectangle withthesyntax rolename Typename multiplicity Allthreemaybeomitted Ifmultiplicityisomitted itdefaultstoone Areferencetoanexternalobject onenotownedbytheenclosingobject isshownbyadashedrectangle partB SharedPart connector parts ClassDiagramversusStructureDiagram Schedule Student 0 1 Schedule 0 1 Student shared Schedule 0 ClassDiagram StructureDiagram shared comp Example StructureDiagram CourseRegistrationSystem Review WhatIsGeneralization Arelationshipamongclasseswhereoneclasssharesthestructureand orbehaviorofoneormoreclassesDefinesahierarchyofabstractionsinwhichasubclassinheritsfromoneormoresuperclassesSingleinheritanceMultipleinheritanceIsan isakindof relationship Relationships Dependency ArelationshipbetweentwomodelelementswhereachangeinonemaycauseachangeintheotherNon structural using relationship Package Class Dependencyrelationship Component Dependencyrelationship Dependencyrelationship The stereotypeisimplicitanddoesnotneedtobeshown Oneclassifierservesasthecontractthattheotherclassifieragreestocarryout foundbetween InterfacesandtheclassifiersthatrealizethemUsecasesandthecollaborationsthatrealizethem Oneclassifierservesasthecontractthattheotherclassifieragreestocarryout foundbetween InterfacesandtheclassifiersthatrealizethemUsecasesandthecollaborationsthatrealizethem Relationships Realization Collaboration UseCase Subsystem Class Component InterfaceName InterfaceName InterfaceName Review WhatIsPolymorphism ManufacturerA ManufacturerB ManufacturerC OOPrinciple Encapsulation Theabilitytohidemanydifferentimplementationsbehindasingleinterface RemoteControl WhatIsanInterface Adeclarationofacoherentsetofpublicfeaturesandobligations Acontractbetweenprovidersandconsumersofservices Examplesofinterfacesare Providedinterface Theinterfacesthattheelementexposestoitsenvironment Requiredinterface Theinterfacesthattheelementrequiresfromotherelementsinitsenvironmentinordertobeabletoofferitsfullsetofprovidedfunctionality Example AProvidedInterface RemoteSensor ManufacturerA RemoteSensor ManufacturerB ManufacturerC ManufacturerA ManufacturerB ManufacturerC Elided IconicRepresentation ball Canonical Class Stereotype Representation Example ARequiredInterface RemoteSensor RemoteSensor Elided IconicRepresentation socket Canonical Class Stereotype Representation Example ConnectingInterfaces RemoteControl RemoteSensor ManufacturerA ManufacturerB ManufacturerC RemoteSensor RemoteControl ManufacturerA ManufacturerB ManufacturerC WhatisaPort Aportisastructuralfeaturethatencapsulatestheinteractionbetweenthecontentsofaclassanditsenvironment PortbehaviorisspecifiedbyitsprovidedandrequiredinterfacesPermitstheinternalstructuretobemodifiedwithoutaffectingexternalclientsExternalclientshavenovisibilitytointernalsAclassmayhaveanumberofportsEachporthasasetofprovidedandrequiredinterfaces PortNotation Aportisshownasasmallsquarewiththenameplaced

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论