




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
OO方法、RUP与UML建模首席软件专家张恂博讯科技(上海)有限公司浩方科技集团2000.11OO方法、RUP与UML建模首席软件专家张恂1主要内容一、OOAD与UML表示法二、RUP建模过程与步骤三、讨论主要内容2一、OOAD与UML表示法OO方法、RUP与UML建模课件3OO原则Abstraction(抽象)Encapsulation(封装)Modularity(模块化)Hierarchy(分层)OO原则Abstraction(抽象)4OO三要素封装继承多态OO三要素封装5OO基本概念对象类属性操作(方法)接口(多态)*构件*关系包子系统*OO基本概念对象关系6接口与多态Polymorphism:Theabilitytohidemanydifferentimplementationsbehindasingleinterface.Interfacesformalizepolymorphism,support“plug-and-play”architectures.接口与多态Polymorphism:Theability7接口与多态接口与多态8ComponentAnon-trivial,nearlyindependent,andreplaceablepartofasystemthatfulfillsaclearfunctioninthecontextofawell-definedarchitecture.sourcecodecomponent,runtimecomponents,executablecomponentComponentAnon-trivial,nearly9SubsystemAcombinationofapackage(cancontainothermodelelements)andaclass(hasbehavior)Realizesoneormoreinterfaceswhichdefineitsbehavior.SubsystemAcombinationofapa10OOAD是主流技术OOAD大部分情况下比结构化设计好: 结构化设计是过时的东西,它强调软件的结构按照功能来组织,一旦功能改变,软件的结构就会不稳定。 而OO设计把数据流和功能统一起来,IT行业绝大部分(70-80%)的软件设计(包括数据库设计)可以采用OO方法,目前国外流行的趋势也是这样,剩下的少部分有特定需求的可能还会用传统方法。 另外在电信界,用有限自动状态机的SDL方法仍占绝大数,但现在UML和SDL出现了融合的趋势。OOAD是主流技术OOAD大部分情况下比结构化设计好:11ObjectOrientedAnalysis用面向对象方法分析问题域,建立基于对象、消息的业务模型,形成对客观世界和业务本身的正确认识。生成业务对象的动、静态模型和抽象类。ObjectOrientedAnalysis用面向对象方12ObjectOrientedDesign针对OOA给出的问题域模型,用面向对象方法设计出软件基础架构(概要设计)和完整的类结构(详细设计),以实现业务功能。生成对象类的动、静态模型(解决域)。ObjectOrientedDesign针对OOA给出的13Analysisvs.DesignAnalysisFocusonunderstandingtheproblemIdealizeddesignBehaviorSystemStructureFunctionalrequirementsAsmallmodelDesignFocusonunderstandingthesolutionOperationsandAttributesPerformanceClosetorealcodeObjectlifecyclesNon-functionalrequirementsAlargemodelAnalysisvs.DesignAnalysisDes14“4+1”视图UseCaseView(End-user:Functionality)LogicalView(Analysts/Designers:Structure)ProcessView(Systemintegrators:Performance,Scalability,Throughput)ImplementationView(Programmers:Softwaremanagement)DeploymentView(Systemengineering:SystemTopology,Delivery,installation,communication)“4+1”视图UseCaseView(End-user15UML图示UseCaseDiagramSequenceDiagramClassDiagramCollaborationDigramStateDiagramActivityDiagramComponentDiagramDeploymentDiagramUML图示UseCaseDiagramComponent16Actor-用户“AnActordefinesacoherentsetofrolesthatusersofusecasesplaywheninteractingwithusecases.Anactorhasoneroleforeachusecasewithwhichitcommunicates.”角色的集合,可以是人或外部系统。定义了“系统边界”。Actor-用户“AnActordefinesa17UseCase-用例Thespecificationofasequenceofactions,includingvariants,thatasystem(orotherentity)canperform,interactingwithactorsofthesystem.Ausecaseisacoherentunitoffunctionalityprovidedbyasystem,asubsystem,oraclassasmanifestedbysequencesofmessagesexchangedamongthesystemandoneormoreoutsideinteractors(calledactors)togetherwithactionsperformedbythesystem.UseCase-用例Thespecification18BusinessUseCase/ActorBusinessUseCase/Actor19Business-System例子Business-System例子20课程登记系统课程登记系统21OO方法、RUP与UML建模课件22UseCase依赖关系•Association–Theparticipationofanactorinausecase,i.e.instancesoftheactorandinstancesoftheusecasecommunicatewitheachother.Thisistheonlyrelationshipbetweenactorsandusecases.•Extend–AnextendrelationshipfromusecaseAtousecaseBindicatesthataninstanceofusecaseBmaybeextended(subjecttospecificconditionsspecifiedintheextension)bythebehaviorspecifiedbyA.ThebehaviorisinsertedatthelocationdefinedbytheextensionpointinBwhichisreferencedbytheextendrelationship.UseCase依赖关系•Association–Th23UseCase依赖关系•Generalization–AgeneralizationfromusecaseAtousecaseBindicatesthatAisaspecializationofB.•Include–AnincluderelationshipfromusecaseAtousecaseBindicatesthataninstanceoftheusecaseAwillalsoincludethebehaviorasspecifiedbyB.ThebehaviorisincludedatthelocationwhichdefinedinA.UseCase依赖关系•Generalization–24产品定购管理产品定购管理25ActorGeneralizationActorGeneralization26SequenceDiagram Adiagramthatshowsobjectinteractionsarrangedintimesequence.Inparticular,itshowstheobjectsparticipatingintheinteractionandthesequenceofmessagesexchanged. Unlikeacollaborationdiagram,asequencediagramincludestimesequencesbutdoesnotincludeobjectrelationships. Asequencediagramcanexistinagenericform(describesallpossiblescenarios)andinaninstanceform(describesoneactualscenario). Sequencediagramsandcollaborationdiagramsexpresssimilarinformation,butshowitindifferentways.SequenceDiagram Adiagramtha27序列图元素序列图元素28UseCase描述简述: ThisusecaseallowsaStudenttoregisterforcourseofferinginthecurrentsemester.TheStudentcanalsoupdateordeletecourseselectionsifchangesaremadewithintheadd/dropperiodatthebeginningofthesemester.TheCourseCatalogSystemprovidesalistofallthecourseofferingsforthecurrentsemester.UseCase描述简述:29事件流BasicFlow: ThisusecasestartwhenaStudentwishestoregisterforcourseofferings,ortochangehis/herexistingcourseschedule.1.ThesystemrequeststhattheStudentspecifythefunctionhe/shewouldliketoperform(eitherCreateaSchedule,UpdateaSchedule,orDeleteaSchedule).2.OncetheStudentprovidestherequestedinformation,oneofthesubflowsisexecuted. IftheRegistrarselected“CreateaSchedule”,theCreateaSchedulesubflowisexecuted. (UpdateaSchedule,DeleteaSchedule)事件流BasicFlow:30CreateaSchedule1.ThesystemretrievesalistofavailablecourseofferingsfromtheCourseCatalogSystemanddisplaysthelisttotheStudent.2.TheStudentselects4primarycourseofferingsand2alternatecourseofferingsfromthelistofavailableofferings.3.Oncethestudenthasmadehis/herselections,thesystemcreatesaschedulefortheStudentcontainingtheselectedcourseofferings.4.TheSubmitSchedulesubflowisexecuted.CreateaSchedule1.Thesystem31类的划分边界类控制类实体类类的划分边界类32选课选课33理解UseCase和Actor1)UseCase绝不是锦上添花的东西,一方面它可以促进与用户沟通,理解正确的需求,另一方面它可以划分系统与外部实体的界限,是系统设计的起点,而最终应该落实到类和实现代码上。2)UseCaseView与LogicalView应该由明确的相关性。UML中从UseCase到类包的关联可以用依赖(或实现)关系描述。3)Actor不是指人,而是指代表某一种特定功能的角色,因此同一个人可能对应很多个Actor。Actor是虚拟的概念,可以指外部系统和设备。4)UseCase是对系统行为的动态描述,它是OO设计的起点,是类、对象、操作的来源,而通过逻辑视图的设计,可以获得软件的静态结构。
理解UseCase和Actor1)UseCase绝不是锦34ClassDiagramAdiagramthatshowsacollectionofdeclarative(static)modelelements,suchasclasses,types,andtheircontentsandrelationships.ClassDiagramAdiagramthatsh35ClassClass36ExportControlPublic Theelementisvisibleoutsideoftheenclosingpackageandyoucanimportittootherportionsofyourmodel.Operationsareaccessibletoallclients.Protected Theelementisaccessibleonlytonestedclasses,friends,ortotheclassitself.Private Theelementisaccessibleonlytonestedclasses,friends,ortotheclassitself.Implementation Theelementisvisibleonlyinthepackageinwhichitisdefined.Anoperationispartoftheimplementationoftheclass.ExportControlPublic Theeleme37类的并发性Sequential(default)-Thesemanticsoftheclassareguaranteedonlyinthepresenceofasinglethreadofcontrol.Onlyonethreadofcontrolcanbeexecutinginthemethodatanyonetime.Guarded-Thesemanticsoftheclassareguaranteedinthepresenceofmultiplethreadsofcontrol.Aguardedclassrequirescollaborationamongclientthreadstoachievemutualexclusion.Active-Theclasshasitsownthreadofcontrol.Synchronous-Thesemanticsoftheclassareguaranteedinthepresenceofmultiplethreadsofcontrol;mutualexclusionissuppliedbytheclass.类的并发性Sequential(default)-Th38参数化和实例化类Parameterized/InstantiatedClassC++Template参数化和实例化类Parameterized/Instanti39UtilityClassUtilityClass40关系AssociationAggregationCompositionDependencyRealizationGeneralization(inheritance)关系Association41RealizationRealization42聚合关系Aggregation:Aspecialformofassociationthatmodelsawhole-partrelationshipbetweenanaggregate(thewhole)anditsparts.聚合关系Aggregation:Aspecialfor43合成关系Composition:Aformofaggregationwithstrongownershipandcoincidentliftimes.Thepartscannotsurvivethewhole/aggregate.合成关系Composition:Aformofagg44Association关联类Association关联类45Multiplicity关系的多重性ExactlyOne: 1Zeroormore: 0..nOneormore: 1..nZeroorone: 0..1Specifiedrange:2..4Multiple,disjointranges:2,4..6Multiplicity关系的多重性46OO方法、RUP与UML建模课件47GeneralizationinheritanceGeneralizationinheritance48DependencyAdependencyindicatesasemanticrelationshipbetweentwo(ormore)modelelements.Itrelatesthemodelelementsthemselvesanddoesnotrequireasetofinstancesforitsmeaning.Itindicatesasituationinwhichachangetothetargetelementmayrequireachangetothesource elementinthedependency.DependencyAdependencyindicat49依赖关系bind–Binding:Abindingoftemplateparameterstoactualvaluestocreateanonparameterizedelement.trace–Trace:Ahistoricalconnectionbetweentwoelementsthatrepresentthesameconceptatdifferentlevelsofmeaning.refine–Refinement:Ahistoricalorderivationconnectionbetweentwoelementswithamapping(notnecessarilycomplete)betweenthem.依赖关系bind–Binding:Abinding50依赖关系use–Usage:Asituationinwhichoneelementrequiresthepresenceofanotherelementforitscorrectimplementationorfunctioning.Maybestereotypedfurthertoindicatetheexactnatureofthedependency,suchascallinganoperationofanotherclass,grantingpermissionforaccess, instantiatinganobjectofanotherclass,etc.MapsintoaUsage. IfthekeywordisoneofthestereotypesofUsage(call,create,instantiate,send)thenitmapsintoaUsagewiththegivenstereotype.依赖关系use–Usage:Asituationi51依赖关系derive–DerivationAcomputablerelationshipbetweenoneelementandanother(onemorethanoneofeach).access-Thegrantingofpermissionforonepackagetoreference thepublicelementsownedbyanotherpackage(subjecttoappropriatevisibility).MapsintoaPermissionwiththestereotypeaccess.import-Thegrantingofpermissionforonepackagetoreferencethepublicelementsofanotherpackage,togetherwithaddingthenamesofthepublicelementsofthesupplierpackagetotheclientpackage.MapsintoaPermissionwiththestereotypeimport.依赖关系derive–DerivationAcomp52四种UML依赖关系异同绑定关系位于模板(如C++模板)和用其生成的模型元素之间,该元素完全是模板的实例化,为添加任何新的东西。可溯关系是两个元素或元素集合之间的概念连接,用于描述位于不同语义层或多种视点下的同一个概念。这些元素间并没有任何特定的映射关系,关系的方向可被忽略。通常用于跟踪需求,或帮助建模者跟踪多个模型的变化。使用关系表示一个元素为了实现或完成其全部的功能需要其它元素或元素集合的配合,例如类与类之间的多种方法调用关系。细化关系是不同语义层(如分析和设计)之间模型元素的依赖关系,表示客户可由供应者导出。这一导出关系不一定非要用算法来描述,可以完全人为决定,因此细化关系可描述的语义范围较广,包括:模型的逐步细化、优化、变换、模板、模型合成、框架组成等等。绑定和使用关系只能用于同一模型中元素的连接,而可溯和细化关系可用于连接多个模型的元素。四种UML依赖关系异同绑定关系位于模板(如C++模板)和用其53OO方法、RUP与UML建模课件54InterfaceInterface55CollaborationDiagramAdiagramthatshowsinteractionsorganizedaroundthestructureofamodel,usingeitherclassifiersandassociationsorinstancesandlinks.Unlikeasequencediagram,acollaborationdiagramshowstherelationshipsamongtheinstances.Sequencediagramsandcollaborationdiagramsexpresssimilarinformation,butshowitindifferentways.CollaborationDiagramAdiagram56协作图元素ObjectClassinstance协作图元素Object57完成课程登记完成课程登记58StateDiagramState: Aconditionorsituationduringthelifeofanobjectduringwhichitsatisfiessomecondition,performssomeactivity,orwaitsforsomeevent.StateDiagramState:59选课选课60HistoryThehistoryiconprovidesamechanismtoreturntothemostrecentlyvisitedstateoractivitywhentransitioningdirectlytoastateoractivitywithsubstates.Historyappliestothegivenlevelinwhichitappears.HistoryThehistoryiconprovid61OO方法、RUP与UML建模课件62ActivityDiagramAnactivityisanongoingnon-atomic(inotherwords,interruptible)executionwithinastatemachine.Anactivitygraphisastatemachineinwhichmostorallofthestatesareactionstatesoractivitystates,andinwhichmostorallofthetransitionsaretriggeredbycompletionofactivityinthesourcestates.Anactivitygraphemphasizesthesequentialandconcurrentstepsofacomputationalprocedureoraworkflow.ActivityDiagramAnactivityis63用途 Anactivitygraphisavariationofastatemachineinwhichthestatesrepresenttheperformance ofactionsorsubactivitiesandthetransitionsaretriggeredbythecompletionoftheactionsor subactivities.Itrepresentsastatemachineofaprocedureitself.描述业务模型(UseCase分析)描述类动态模型(类设计)用途 Anactivitygraphisavari64活动图与状态图比较Anactivitydiagramisaspecialcaseofastatediagraminwhichall(oratleastmost)ofthestatesareactionorsubactivitystatesandinwhichall(oratleastmost)ofthetransitionsaretriggeredbycompletionoftheactionsorsubactivitiesinthesourcestates.Theentireactivitydiagramisattached(throughthemodel)toaclass,suchasausecase,ortoapackage,ortotheimplementationofanoperation.Thepurposeofthisdiagramistofocusonflowsdrivenbyinternalprocessing(asopposedtoexternalevents).Useactivitydiagramsinsituationswhereallormostoftheeventsrepresentthecompletionofinternally-generatedactions(thatis,proceduralflowofcontrol).Useordinarystatediagramsinsituationswhereasynchronouseventsoccur.活动图与状态图比较Anactivitydiagrami65ActionstateAnactionstateisashorthandforastatewithanentryactionandatleastoneoutgoingtransitioninvolvingtheimpliciteventofcompletingtheentryaction(theremaybeseveralsuchtransitionsiftheyhaveguardconditions).Actionstatesshouldnothaveinternaltransitionsoroutgoingtransitionsbasedonexplicitevents,usenormalstatesforthissituation.Thenormaluseofanactionstateistomodelastepintheexecutionofanalgorithm(aprocedure)oraworkflowprocess.ActionstateAnactionstateis66ActivitystateAsubactivitystateinvokesanactivitygraph.Whenasubactivitystateisentered,theactivitygraph“nested”initisexecutedasanyactivitygraphwouldbe.Thesubactivitystateisnotexiteduntilthefinalstateofthenestedgraphisreached,orwhentriggereventsoccurontransitionscomingoutofthesubactivitystate.Sincestatesinactivitygraphsdonotnormallyhavetriggerevents,subactivitystatesarenormallyexitedwhentheirnestedgraphisfinished.Asingleactivitygraphmaybeinvokedbymanysubactivitystates.ActivitystateAsubactivityst67Action-ObjectFlowActionsoperatebyandonobjects.Theseobjectseitherhaveprimaryresponsibilityforinitiatinganaction,orareusedordeterminedbytheaction.Actionsusuallyspecifycallssentbetweentheobjectowningtheactivitygraph,whichinitiatesactions,andtheobjectsthatarethetargetsoftheactions.Action-ObjectFlowActionsoper68举例1)选课程计划2)户籍管理3)喝咖啡举例1)选课程计划69ComponentDiagram Aphysical,replaceablepartofasystemthatpackages implementationandconformstoandprovidesthe realizationofasetofinterfaces. Acomponentrepresentsaphysicalpieceofimplementationofasystem,includingsoftwarecode(source,binaryorexecutable)orequivalentssuchasscriptsorcommandfiles.ComponentDiagram Aphysical,70componentasoftwaremodule(sourcecode,binarycode,executable,DLL,etc.)ponentasoftwaremodule(so71ComponetstereotypesMainprograms,主程序Packages,构件包Subprograms,子程序Tasks,独立线程EXE,可执行文件DLL,动态连接库ComponetstereotypesMainprogr72任务独立线程。任务独立线程。73子程序不含类声明。子程序不含类声明。74动态链接库动态链接库75主程序主程序76构件包子系统构件包子系统77构件依赖关系软件模块的编译和运行时关系。
clientcomponentcaninheritfrom,containinstancesof,use,andotherwisedependonclassesthatareexportedfromthesuppliercomponent.Youcandrawadependencyrelationshipfromacomponenttoaninterfaceofanothercomponent,whichmeansthattheclientcomponentusestheoperationsoftheothercomponent.Youcanalsodrawarealizerelationshipfromacomponenttoaninterfaceofanothercomponent,whichmeansthattheclientcomponentprovidestheoperationsoftheothercomponent.构件依赖关系软件模块的编译和运行时关系。78DeploymentDiagram Adiagramthatshowstheconfigurationofrun-timeprocessingnodesandthecomponents,processes,andobjectsthatliveonthem.Componentsrepresentrun-timemanifestationsofcodeunits.处理机设备DeploymentDiagram Adiagramt79处理机Characteristics 硬件的物理描述。theconnectiontypeandbandwidth,themanufacturer,model,memory,anddisksofamachine,orthekindandsizeofadevice.Processes Processesdenotetherootofamainprogramfromacomponentdiagramorthenameofanactiveobjectfromacollaborationdiagram.进程优先级处理机Characteristics80处理机Scheduling,进程调度方式preemptive(缺省),抢占式non-preemptive,非抢占式cyclic,循环式executive,算法控制manual,外部控制处理机Scheduling,进程调度方式81Device无计算能力的外部设备,如modem、终端。theconnectiontypeandbandwidth,themanufacturer,model,memory,anddisksofamachine,orthekindandsizeofadeviceDevice无计算能力的外部设备,如modem、终端。82Connection连接,两个实体间的硬件耦合,通信通道。直接连接,如RS-232。间接连接,如卫星。Connection连接,两个实体间的硬件耦合,通信通道。83二、RUP建模过程与步骤OO方法、RUP与UML建模课件84系统分析、设计工作流系统分析、设计工作流85OO方法、RUP与UML建模课件86UseCase分析步骤SupplementtheUse-CaseDescriptionForeachuse-caserealizationFindClassesfromUse-CaseBehaviorDistributeUse-CaseBehaviortoClassesForeachresultinganalysisclassDescribeResponsibilitiesDescribeAttributesandAssociationsQualifyAnalysisMechanismsUnifyAnalysisClassesCheckpoints[举例]UseCase分析步骤SupplementtheUse87UseCaseViewBusinessObjectModel(可选) describingthebusinessUseCaseModel forthesystemamodelofthebehaviorofasystemwhichsupportsthebusinessprocesses.UseCaseViewBusinessObjectM88UseCaseModelTheUse-CaseModelistraceableto(andderivesfrom)theBusinessModel.Thesystem(asdescribedintheUseCaseModel)providesbehaviorthatsupportsthebusiness.UseCaseModelTheUse-CaseMod89UseCasepackageUseCasepackage AllUseCasesinthesystemarecontainedinthispackage.Thisisdonestrictlyasawaytoorganizethemodelandmakeiteasiertounderstand. UseCasesareoftendocumentedinaseparatetextfile,usetheRationalUnifiedProcesstemplateorusetheusecasetemplateinRationalRequsitePro. The"UseCaseRealizations"thatcorrespondtotheseusecasesarecreatedintheDesignModel..UseCasepackageUseCasepacka90UseCasepackageIncludedUseCasespackage contains"common"usecaseswhicharetextuallyincludedinoneormoreotherusecases.Theyareorganizedinthispackagetopromotegreaterreuse.ArchitecturallySignificantUseCasesdiagram containsallarchitecturallysignificantusecases.<Annotationsmaybeaddedtothediagramtoexplainwhyparticularusecasesarearchitecturallysignificant.>UseCasepackageIncludedUseC91ActorPackageActorpackage AllActorsinthesystemarecontainedinthispackage.Thisisbothasawaytoorganizethemodel,makingiteasiertounderstand,andtoprovideawaytomanagetheactorsinasingleconfigurationitem.ActorPackageActorpackage92LogicalViewAnalysisModel(optional) containsasetofAnalysisClasses,whichdescribeanabstractrealizationoftheusecasesofthesystem;evolveintoassociateddesignelementswhicharemodeledintheDesignModel.BusinessObjectModelDesignModelLogicalViewAnalysisModel(op93BusinessObjectModelcontainsasetofinteractingworkersandbusinessentity(domain)classeswhichcollaboratetoenactthebusinessprocesses.Insomecases,onlythebusinessentityclassesaredocumented.Thebusinessentityclassesasawholearesometimesreferredtoasa'domainmodel'.ThebusinessmodelingworkflowinRationalUnifiedProcessproducestwomodels:thebusinessuse-casemodel,andthebusinessobjectmodel.Bothshowthebusinessprocesses,butdifferentaspectsofthem.Inthebusinessuse-casemodeleachbusinessusecaserepresentsabusinessprocess,described(textand/oractivitydiagrams)froman"external"viewpointwithoutworryingaboutwhodoeswhattowhominsideoftheorganization.Inthebusinessobjectmodel,youincluderealizationsofeachbusinessusecasetoshowhowworkersandentitiescollaboratetoperformtheprocess.Youdothatusingclassdiagrams,activitydiagramswithswimlanes,collaborationdiagrams,and/orinteractiondiagrams.BusinessObjectModelcontains94DesignModelisadaptedtomodeltherealimplementationenvironment,andservesasanabstractionofthesourcecode.Itisa"blueprint"ofhowthesourcecodeisstructuredandwritten.Thedesignmodelisahierarchyofpackages(designsubsystemsanddesign-servicepackages),with"leaves"thatareclasses.Subsystemsareadesign"view"ofthecomponentsthataredefinedintheImplementationModel.Thedesignmodelhierarchyconsistsoflayers.Classesrepresentabstractionsofclassesinthesystem'simplementation.Theydefinetheobjects,whichinturnareabstractionsoftheobjectsinthesystem'simplementation.Theusecasesarerealizedbytheobjects,andthisisrepresentedbyuse-caserealizationsintheDesignModel.Eachuse-caserealizationhasarealizedependencytoausecaseintheUse-CaseModel.
DesignModelisadaptedtomode95DesignModelLayerProcessView Anarchitecturalviewthatdescribestheconcurrentaspectofthesystem:tasks(processes)andtheirinteractions.UseCaseRealizationsArchitecturallySignificantModelElementsArchitectureOverview-Package,SubsystemLayeringDesignModelLayer96LayerThedesignmodelisnormallyorganizedinlayers.Thenumberoflayersisnotfixed,butvariesfromsituationtosituation.Duringarchitecturalanalysis,focusisnormallyonthetwohigh-levellayers,thatis,theapplicationandbusiness-specificlayers;thisiswhatismeantbythe"high-levelorganizationofsubsystems."Theotherlower-levellayersareinfocusduringarchitecturaldesign,refertotheactivityArchitecturalDesignformoreinformation.LayerThedesignmodelisnorma97Layer-packageApackageshouldbeusedincaseswhereasetofclassesand/orotherpackagesneedtobegroupedtogetherformodelorganizationpurposes.Thoughthecontentsofthepackagecanhavepublicvisibility,whichmakesthemvisibletomodelelementsoutsidethecontainingpackage,packagesareprimarilyjustgroupingmechanisms.Ifasetofclassesistobeencapsulatedandcanbehiddenbehindawell-definedinterface,asubsystemisamoreappropriatecontainer.Layer-packageApackageshoul98Layer-subsystemAsubsystemshouldbeusedincaseswhereasetofclassesand/orotherpackagesneedtobeencapsulatedwithinacontainerandhiddenbehindasetofwell-definedinterfaces.Byconvention,noneofthecontentsofsubsystemarevisibleexcepttheinterfacesofthesubsystem.Thisallowssubsystemstobeeasilyreplaced,andtheimplementationschanged,providedtheinterfacesremainunchanged.Itoffersadegreeofencapsulationgreaterthanthatofthepackage.Ifasetofclassesismerelytobegroupedtogether,butpublicvisibilityofclassesisstilldesirable,apackageisamoreappropriatecontainer.Layer-subsystemAsubsystems99Subsystem设计步骤DistributeSubsystembehaviortoSubsystemElementsDocumentSubsystemElementsDescribeSubsystemDependenciesCheckpointsSubsystem设计步骤DistributeSubsys100Class设计步骤CreateInitialDesignClassesIdentifyPersistentClassesDefineOperationsDefineClassVisibilityDefineMethodsDefineStatesDefineAttributesDefineDependenciesDefineAssociationsDefineGeneralizationsResolveUseCaseCollisionsHandleNon-FunctionalRequirementsinGeneralCheckpointsClass设计步骤CreateInitialDesign101ProcessViewProcessviewdiagram-
illustratesthecompositionofprocessesandthreads,andthemappingofclassesontothoseprocessesandthreads.ProcessViewProcessviewdiagr102UseCase设计步骤DescribeInteractionsBetweenDesignObjectsSimplifyInteractionDiagramsUsingSubsystems(optional)DescribePersistence-RelatedDescriptionRefinetheFlowofEventsDescriptionUnifyClassesandSubsystemsCheckpointsUseCase设计步骤DescribeInteracti103UseCaseRealizationspackageInthisPackagewewilldescribe"UseCaseRealizations"asstereotypedusecases.Ause-caserealizationdescribeshowaparticularusecaseisrealizedwithinthedesignmodel,intermsofcollaboratingobjects.Arealizedependencyisusedbetweenthe"UseCaseRealization"andthe"UseCase"intheuse-casemodelthatisrealized.UseCaseRealizationspackageI104UseCaseRealizationParticipatingclassesdiagramrealizedependiciesSequenceDiagram basictype,otherflowtypeUseCaseRealizationParticipat105ComponentViewImplementationModel isacollectionofcomponents,andtheimplementationsubsystemsthatcontainthem.
Anarchitecturalviewthatdescribesoneorseveralsystemconfigurations;themappingofsoftwarecomponents(tasks,modules)tothecomputingnodesintheseconfigurations. Definesexecutables,dlls,files,subsystems,compilationorderetc. Itisrecommendedthat,inmostcases,themappingshouldbe 1:1betweendesignandimplementation,thatis,foreachpackageindesignthereisonesubsystemintheimplementationmodel.ComponentViewImplementationM106DeploymentViewDefinesthetypicalphysicalnetworkconfigurations,includingthosetypicallyusedbyendusers,aswellasspecialconfigurationsusedfordevelopmentandtest.Allocateprocessestothevariousnodes.Allocationtakesintoaccountthecapacityofthenodes(intermsof bothmemoryandprocessing),bandwidthofthecommunicationmedium(bus,LANs,WANs),andthe availabilityofthehardwareandcommunicationlinks,rerouting,andsoon.DeploymentViewDefinesthetyp107三、讨论OO方法、RUP与UML建模课件108
3.RUP的方法是迭代式的,是不是可以理解为软件开发时先做一个简单的,实现基本功能的软件,然后再不断的改进,但是以前的开发过程中,有些情况应该首先将界面设计好,然后在编写业务代码的同时,同步进行使用手册、产品演示等工作,如果采用RUP应该如何协调?
Risk-drivenMilestone
3.RUP的方法是迭代式的,是不是可以理解为软件开109OO方法、RUP与UML建模课件110
4.我觉得完全按照Rose的各种框图设计太繁琐了,能不能推荐一种简化的方案?
应动静结合,不能随意简化,否则对系统的认识不完整,最终以说清楚为准。可参考RoseRUPFramework。
4.我觉得完全按照Rose的各种框图设计太繁琐了,能不能推111
5.Rose的中文化问题,哪些对象的命名可用中文?如Sequence图中的Message命名是否不能用中文?
业务模型、抽象类,不影响代码生成的图形元素均可以。
5.Rose的中文化问题,哪些对象的命名可用中文?如Se112
6.Sequence图与Class图是否是同时生成并交互修改?
1)严格地说
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 物业租赁管理合同协议
- 专柜装修合同装修合同协议
- 房屋转让协议合同书
- 聘请劳务合同
- 安置房买卖协议合同
- 小学六英语试卷答案
- 卖鱼销售合同范本
- 个人一周工作计划
- 冷冻品供货合同范本
- 三年级下册音乐教案
- 2025年高考语文备考训练之社会现象:“数字囤积症”
- 2025包头青山宾馆有限公司面向社会公开招聘18人笔试参考题库附带答案详解
- 2025至2030年中国毛绒卡通玩具数据监测研究报告
- 2025年度智能充电桩场地租赁合同范本3篇
- 2024年芜湖职业技术学院高职单招语文历年参考题库含答案解析
- 17J008挡土墙(重力式、衡重式、悬臂式)图示图集
- 北师大版三年级下册数学口算题练习1000道带答案
- 技术推广服务合同模板五篇
- 《智能制造技术基础》课件-第3章 智能制造加工技术
- 四川政采评审专家入库考试基础题复习测试题
- 挑战杯-申报书范本
评论
0/150
提交评论