Introduction to UML 2.0
Total Page:16
File Type:pdf, Size:1020Kb
® IBM Software Group Introduction to UML 2.0 Terry Quatrani UML Evangelist © 2005 IBM Corporation IBM Software Group Session Objectives ! After completing this session, you should be able to: !Identify the different UML diagrams !Describe the purpose of each diagram !State where diagrams can be used 2 IBM Software Group Agenda ! The Importance of Modeling ! The Unified Modeling Language ! Model-Driven Architecture ! UML Diagrams ! Extending the UML 3 IBM Software Group Agenda ! The Importance of Modeling ! The Unified Modeling Language ! Model-Driven Architecture ! UML Diagrams ! Extending the UML 4 IBM Software Group The Importance of Modeling 5 IBM Software Group Why do we model? ! To manage complexity ! To detect errors and omissions early in the lifecycle ! To communicate with stakeholders ! To understand requirements ! To drive implementation ! To understand the impact of change ! To ensure that resources are deployed efficiently 6 IBM Software Group Agenda ! The Importance of Modeling ! The Unified Modeling Language ! Model-Driven Architecture ! UML Diagrams ! Extending the UML 7 IBM Software Group The Unified Modeling Language ! The UML is the standard language for visualizing, specifying, constructing, and documenting the artifacts of a software- intensive system 8 IBM Software Group UML: The LanguageBlobs of with Software writing in their Development hair And small adornments in the air And has-relations everywhere Adopted majorI've looked revision at clouds (2004) that way. UML 2.0 But now I've purged them from my GradySun Current minor Eliminatedrevision 2001 every one UML 1.5 So many things I would have done To drive the clouds away. Minor revision 1999 UML 1.3 Public I've looked at clouds from both sides now OMG Acceptance,Both in Nov and 1997 out, and still somehow Feedback Final submissionIt's to clouds' OMG, Sept delusions 1997 I appall JimUML 1.1 I really can't stand clouds at all… UML partners Balls for multiplicity UML 1.0 Black and white for clarity And data flows arranged in trees Web - June 1996 Were part of OMT. UML 0.9 But now I've had to let themIvar go OOPSLA 95We'll do it differently, you knowUnified Method 0.8 'Cause Grady said, they've got to go We can't use OMT. Other methods OOSE Booch method OMT 9 IBM Software Group Approach to Evolving UML 2.0 ! Evolutionary rather than revolutionary ! Improved precision of the infrastructure ! Small number of new features ! New feature selection criteria !Required for supporting large industrial-scale applications !Non-intrusive on UML 1.x users (and tool builders) ! Backward compatibility with 1.x 10 IBM Software Group Formal RFP Requirements ! Infrastructure – UML internals !More precise conceptual base for better MDA support !MOF-UML alignment ! Superstructure – User-level features !New capabilities for large-scale software systems !Consolidation of existing features ! OCL – Constraint language !Full conceptual alignment with UML ! Diagram interchange standard !For exchanging graphic information (model diagrams) 11 IBM Software Group Infrastructure Requirements ! Precise MOF alignment !Fully shared “common core” metamodel ! Refine the semantic foundations of UML (the UML metamodel) !Improve precision !Harmonize conceptual foundations and eliminate semantic overlaps !Provide clearer and more complete definition of instance semantics (static and dynamic) 12 IBM Software Group OCL Requirements ! Define an OCL metamodel and align it with the UML metamodel !OCL navigates through class and object diagrams ⇒ must share a common definition of Class, Association, Multiplicity, etc. ! New modeling features available to general UML users !Beyond constraints !General-purpose query language 13 IBM Software Group Diagram Interchange Requirements ! Ability to exchange graphical information between tools !Currently only non-graphical information is preserved during model interchange !Diagrams and contents (size and relative position of diagram elements, etc.) 14 IBM Software Group Superstructure Requirements (1 of 2) ! More direct support for architectural modeling !Based on existing architectural description languages (UML-RT, ACME, SDL, etc.) !Reusable interaction specifications (UML-RT protocols) ! Behavior harmonization !Generalized notion of behavior and causality !Support choice of formalisms for specifying behavior ! Hierarchical interactions modeling ! Better support for component-based development ! More sophisticated activity graph modeling !To better support business process modeling 15 IBM Software Group Superstructure Requirements (2 of 2) ! New statechart capabilities !Better modularity ! Clarification of semantics for key relationship types !Association, generalization, realization, etc. ! Remove unused and ill-defined modeling concepts ! Clearer mapping of notation to metamodel ! Backward compatibility !Support 1.x style of usage !New features only if required 16 IBM Software Group Language Architecture MultipleMultiple levelslevels ofof compliance ! A core language + a set of optional “language units” compliance ! Some language units have multiple “levels” LevelLevel 33 State Structured Activities Interactions Detailed Flows Machines Classes and Actions Components LevelLevel 22 MOF Profiles OCL LevelLevel 11 BasicBasic UMLUML (Classes, Basic behavior, Internal structure, Use cases…) UML Infrastructure 17 IBM Software Group The UML 2.0 Specification ! Can be downloaded from http://www.omg.org/cgi-bin/doc?ptc/2004-10-02 18 IBM Software Group Agenda ! The Importance of Modeling ! The Unified Modeling Language ! Model-Driven Architecture ! UML Diagrams ! Extending the UML 19 IBM Software Group Model-Driven Architecture (MDA) ! An OMG initiative to support model-driven development through a series of open standards (1) ABSTRACTION (2) AUTOMATION MDA (3)(3) OPENOPEN STANDARDSSTANDARDS •• ModelingModeling languageslanguages •• InterchangeInterchange facilitiesfacilities •• ModelModel transformationstransformations •• SoftwareSoftware processesprocesses •• etc.etc. 20 IBM Software Group ! Set of modeling languages for specific purposes The Languages of MDA UML “bootstrap” GeneralGeneral RealReal-Time-Time StandardStandard UMLUML profileprofile General-purpose MetaObjectMetaObject modeling language EAI profile FacilityFacility (MOF)(MOF) EAIEAI profileprofile MOFMOF CommonCommon “core” Warehouse “core”“core” Warehouse Software MetamodelMetamodel (CWM)(CWM) Software processprocess profileprofile A modeling language For exchanging for defining modeling information about languages business and data etc.etc. etc.etc. 21 IBM Software Group MOF (Metamodel) Example ! Uses (mostly) class diagram concepts to define ! Language concepts ! Relationships betweenElement concepts 0..1 /owner * /ownedElement Relationship Element Comment * 1..* DirectedRelationship /source 1..* /target 1..* 22 IBM Software Group Agenda ! The Importance of Modeling ! The Unified Modeling Language ! Model-Driven Architecture ! UML Diagrams ! Extending the UML 23 IBM Software Group Meta-models and Notations 24 IBM Software Group Metamodel Description of Objects Na me d E l e me n t ObjectObject Element (from Ownerships) (from Namespaces) owningInstance owningSlot InstanceSpecification Va l ueS pe ci fic at i on {subsets owner} sl o t * {subsets owner} value Slot (from Expressions) {ordered, 1 {subsets 0..1 * ownedElement} subsets ownedElement} StructuralFeature definingFeature (from StructuralFeatures) 1 classifier Classifier 1..* (from Classifiers) instance 1 ValueSpecification (from Expressions) ObjectObject IdentifierIdentifier InstanceValue 25 IBM Software Group Metamodel Structure StructureStructure-Behavior-Behavior DependencyDependency SharedShared BehaviorBehavior SemanticsSemantics DifferentDifferent BehaviorBehavior FormalismsFormalisms 26 IBM Software Group Diagram Elements ! Each diagram has a frame, a content area and a heading ! The frame is a rectangle and is used to denote a border <kind> <name> <parameters> !Frame is optional ! The heading is a string contained in a name tag which is a rectangle with cut off corners in the upper left hand corner of the frame !Format [<kind>] [<name>] [<parameters>] !<kind> can be activity, class, component, interaction, package, state machine, use case 27 IBM Software Group Frame Example Package P Class 1 Class 2 28 IBM Software Group UML 2.0 Diagrams UseUse InteractionInteraction CaseCase DiagramsDiagrams DiagramsDiagrams ActivityActivity ClassClass DiagramsDiagrams DiagramsDiagrams Deployment CompositeComposite Deployment Structure DiagramsDiagrams Structure DiagramsDiagrams ComponentComponent StateState DiagramsDiagrams MachineMachine DiagramsDiagrams 29 IBM Software Group UML 2.0 Diagrams UseUse InteractionInteraction CaseCase DiagramsDiagrams DiagramsDiagrams ActivityActivity ClassClass DiagramsDiagrams DiagramsDiagrams Deployment CompositeComposite Deployment Structure DiagramsDiagrams Structure DiagramsDiagrams ComponentComponent StateState DiagramsDiagrams MachineMachine DiagramsDiagrams 30 IBM Software Group Activities ! Significantly enriched in UML 2.0 (relative to UML 1.x activities) !More flexible semantics for greater modeling power (e.g., rich concurrency model based on Petri Nets) !Many new features ! Major influences for UML 2.0 activity semantics !Business Process Execution Language for Web Services (BPEL4WS) – a de facto standard supported by key industry players (Microsoft, IBM, etc.) !Functional modeling from the systems engineering community (INCOSE) 31 IBM Software Group Activity Diagram ! Activity diagrams show flow of