Unified Modeling Language.docx
《Unified Modeling Language.docx》由会员分享,可在线阅读,更多相关《Unified Modeling Language.docx(8页珍藏版)》请在冰豆网上搜索。
![Unified Modeling Language.docx](https://file1.bdocx.com/fileroot1/2022-12/16/fc00a984-095e-4bcd-94fa-25357dbd0074/fc00a984-095e-4bcd-94fa-25357dbd00741.gif)
UnifiedModelingLanguage
UnifiedModelingLanguage
UnifiedModelingLanguage(UML)isastandardizedgeneral-purposemodelinglanguageinthefieldofobject-orientedsoftwareengineering.Thestandardismanaged,andwascreated,bytheObjectManagementGroup.ItwasfirstaddedtothelistofOMGadoptedtechnologiesin1997,andhassincebecometheindustrystandardformodelingsoftware-intensivesystems.
UMLincludesasetofgraphicnotationtechniquestocreatevisualmodelsofobject-orientedsoftware-intensivesystems.
Contents
∙1Overview
∙2History
o2.1BeforeUML1.x
o2.2UML1.x
o2.3UML2.x
∙3Topics
o3.1Softwaredevelopmentmethods
o3.2Modeling
o3.3Diagramsoverview
▪3.3.1Structurediagrams
▪3.3.2Behaviourdiagrams
▪3.3.3Interactiondiagrams
o3.4Metamodeling
∙4Criticisms
∙5UMLmodellingtools
∙6Seealso
∙7References
∙8Furtherreading
∙9Externallinks
Overview
TheUnifiedModelingLanguage(UML)isusedtospecify,visualize,modify,constructanddocumenttheartifactsofanobject-orientedsoftware-intensivesystemunderdevelopment.UMLoffersastandardwaytovisualizeasystem'sarchitecturalblueprints,includingelementssuchas:
∙activities
∙actors
∙businessprocesses
∙databaseschemas
∙(logical)components
∙programminglanguagestatements
∙reusablesoftwarecomponents.
UMLcombinestechniquesfromdatamodeling(entityrelationshipdiagrams),businessmodeling(workflows),objectmodeling,andcomponentmodeling.Itcanbeusedwithallprocesses,throughoutthesoftwaredevelopmentlifecycle,andacrossdifferentimplementationtechnologies.UMLhassynthesizedthenotationsoftheBoochmethod,theObject-modelingtechnique(OMT)andObject-orientedsoftwareengineering(OOSE)byfusingthemintoasingle,commonandwidelyusablemodelinglanguage.UMLaimstobeastandardmodelinglanguagewhichcanmodelconcurrentanddistributedsystems.UMLisadefactoindustrystandard,andisevolvingundertheauspicesoftheObjectManagementGroup(OMG).
UMLmodelsmaybeautomaticallytransformedtootherrepresentations(e.g.Java)bymeansofQVT-liketransformationlanguages.UMLisextensible,withtwomechanismsforcustomization:
profilesandstereotypes.
History
Historyofobject-orientedmethodsandnotation.
BeforeUML1.x
AfterRationalSoftwareCorporationhiredJamesRumbaughfromGeneralElectricin1994,thecompanybecamethesourceforthetwomostpopularobject-orientedmodelingapproachesoftheday:
Rumbaugh'sObject-modelingtechnique(OMT),whichwasbetterforobject-orientedanalysis(OOA),andGradyBooch'sBoochmethod,whichwasbetterforobject-orienteddesign(OOD).TheyweresoonassistedintheireffortsbyIvarJacobson,thecreatoroftheobject-orientedsoftwareengineering(OOSE)method.JacobsonjoinedRationalin1995,afterhiscompany,ObjectoryAB,wasacquiredbyRational.ThethreemethodologistswerecollectivelyreferredtoastheThreeAmigos.
In1996,Rationalconcludedthattheabundanceofmodelinglanguageswasslowingtheadoptionofobjecttechnology,sorepositioningtheworkonaunifiedmethod,theytaskedtheThreeAmigoswiththedevelopmentofanon-proprietaryUnifiedModelingLanguage.RepresentativesofcompetingobjecttechnologycompanieswereconsultedduringOOPSLA'96;theychoseboxesforrepresentingclassesratherthanthecloudsymbolsthatwereusedinBooch'snotation.
UnderthetechnicalleadershipoftheThreeAmigos,aninternationalconsortiumcalledtheUMLPartnerswasorganizedin1996tocompletetheUnifiedModelingLanguage(UML)specification,andproposeitasaresponsetotheOMGRFP.TheUMLPartners'UML1.0specificationdraftwasproposedtotheOMGinJanuary1997.DuringthesamemonththeUMLPartnersformedaSemanticsTaskForce,chairedbyCrisKobrynandadministeredbyEdEykholt,tofinalizethesemanticsofthespecificationandintegrateitwithotherstandardizationefforts.Theresultofthiswork,UML1.1,wassubmittedtotheOMGinAugust1997andadoptedbytheOMGinNovember1997.
UML1.x
Asamodelingnotation,theinfluenceoftheOMTnotationdominates(e. g.,usingrectanglesforclassesandobjects).ThoughtheBooch"cloud"notationwasdropped,theBoochcapabilitytospecifylower-leveldesigndetailwasembraced.TheusecasenotationfromObjectoryandthecomponentnotationfromBoochwereintegratedwiththerestofthenotation,butthesemanticintegrationwasrelativelyweakinUML1.1,andwasnotreallyfixeduntiltheUML2.0majorrevision.
ConceptsfrommanyotherOOmethodswerealsolooselyintegratedwithUMLwiththeintentthatUMLwouldsupportallOOmethods.Manyothersalsocontributed,withtheirapproachesflavouringthemanymodelsoftheday,including:
TonyWassermanandPeterPircherwiththe"Object-OrientedStructuredDesign(OOSD)"notation(notamethod),RayBuhr's"SystemsDesignwithAda",ArchieBowen'susecaseandtiminganalysis,PaulWard'sdataanalysisandDavidHarel's"Statecharts";asthegrouptriedtoensurebroadcoverageinthereal-timesystemsdomain.Asaresult,UMLisusefulinavarietyofengineeringproblems,fromsingleprocess,singleuserapplicationstoconcurrent,distributedsystems,makingUMLrichbutalsolarge.
TheUnifiedModelingLanguageisaninternationalstandard:
ISO/IEC19501:
2005Informationtechnology–OpenDistributedProcessing–UnifiedModelingLanguage(UML)Version1.4.2
UML2.x
UMLhasmaturedsignificantlysinceUML1.1.Severalminorrevisions(UML1.3,1.4,and1.5)fixedshortcomingsandbugswiththefirstversionofUML,followedbytheUML2.0majorrevisionthatwasadoptedbytheOMGin2005.
AlthoughUML2.1wasneverreleasedasaformalspecification,versions2.1.1and2.1.2appearedin2007,followedbyUML2.2inFebruary2009.UML2.3wasformallyreleasedinMay2010.UML2.4isinthebetastageasofMarch2011.
TherearefourpartstotheUML2.xspecification:
1.TheSuperstructurethatdefinesthenotationandsemanticsfordiagramsandtheirmodelelements
2.TheInfrastructurethatdefinesthecoremetamodelonwhichtheSuperstructureisbased
3.TheObjectConstraintLanguage(OCL)fordefiningrulesformodelelements
4.TheUMLDiagramInterchangethatdefineshowUML2diagramlayoutsareexchanged
Thecurrentversionsofthesestandardsfollow:
UMLSuperstructureversion2.3,UMLInfrastructureversion2.3,OCLversion2.2,andUMLDiagramInterchangeversion1.0.
AlthoughmanyUMLtoolssupportsomeofthenewfeaturesofUML2.x,theOMGprovidesnotestsuitetoobjectivelytestcompliancewithitsspecifications.
Topics
Softwaredevelopmentmethods
UMLisnotadevelopmentmethodbyitself;however,itwasdesignedtobecompatiblewiththeleadingobject-orientedsoftwaredevelopmentmethodsofitstime(forexampleOMT,Boochmethod,Objectory).SinceUMLhasevolved,someofthesemethodshavebeenrecasttotakeadvantageofthenewnotations(forexampleOMT),andnewmethodshavebeencreatedbasedonUML,suchasIBMRationalUnifiedProcess(RUP).OthersincludeAbstractionMethodandDynamicSystemsDevelopmentMethod.
Modeling
ItisimportanttodistinguishbetweentheUMLmodelandthesetofdiagramsofasystem.Adiagramisapartialgraphicrepresentationofasystem'smodel.Themodelalsocontainsdocumentationthatdrivesthemodelelementsanddiagrams(suchaswrittenusecases).
UMLdiagramsrepresenttwodifferentviewsofasystemmodel:
∙Static(orstructural)view:
emphasizesthestaticstructureofthesystemusingobjects,attributes,operationsandrelationships.Thestructuralviewincludesclassdiagramsandcompositestructurediagrams.
∙Dynamic(orbehavioral)view:
emphasizesthedynamicbehaviorofthesystembyshowingcollaborationsamongobjectsandchangestotheinternalstatesofobjects.Thisviewincludessequencediagrams,activitydiagramsandstatemachinediagrams.
UMLmodelscanbeexchangedamongUMLtoolsbyusingtheXMIinterchangeformat.
Diagramsoverview
UML2.2has14typesofdiagramsdividedintotwocategories.Sevendiagramtypesrepresentstructuralinformation,andtheothersevenrepresentgeneraltypesofbehavior,includingfourthatrepresentdifferentaspectsofinteractions.Thesediagramscanbecategorizedhierarchicallyasshowninthefollowingclassdiagram:
UMLdoesnotrestrictUMLelementtypestoacertaindiagramtype.Ingeneral,everyUMLelementmayappearonalmostalltypesofdiagrams;thisflexibilityhasbeenpartiallyrestrictedinUML2.0.UMLprofilesmaydefineadditionaldiagramtypesorextendexistingdiagramswithadditionalnotations.
Inkeepingwiththetraditionofengineeringdrawings,acommentornoteexplainingusage,constraint,orintentisallowedinaUMLdiagram.
Structurediagrams
Structurediagramsemphasizethethingsthatmustbepresentinthesystembeingmodeled.Sincestructurediagramsrepresentthestructure,theyareusedextensivelyindocumentingthesoftwarearchitectureofsoftwaresystems.
∙Classdiagram:
describesthestructureofasystembyshowingthesystem'sclasses,theirattributes,andtherelationshipsamongtheclasses.
∙Componentdiagram:
describeshowasoftwaresystemissplitupintocomponentsandshowsthedependenciesamongthesecomponents.
∙Compositestructurediagram:
describestheinternalstructureofaclassandthecollaborationsthatthisstructuremakespossible.
∙Deploymentdiagram:
describesthehardwareusedinsystemimplementationsandtheexecutionenvironmentsandartifactsdeployedonthehardware.
∙Objectdiagram:
showsacompleteorpartialviewofthestructureofanexamplemodeledsystemataspecifictime.
∙Packagediagram:
describeshowasystemissplitupintol