560 likes | 743 Views
What is UML ? ISFST2002 Tutorial in X’ian October 21, 2002. Akira KUMAGAI PFU LIMITED, Japan kumagai.akira@pfu.fujitsu.com. Contents. What’s UML UML Diagrams Stepwise understanding of UML UML Semantics Examples of Meta-model and OCL UML in the future Summary. What’s UML.
E N D
What is UML ?ISFST2002 Tutorial in X’ianOctober 21, 2002 Akira KUMAGAI PFU LIMITED, Japan kumagai.akira@pfu.fujitsu.com
Contents • What’s UML • UML Diagrams • Stepwise understanding of UML • UML Semantics • Examples of Meta-model and OCL • UML in the future • Summary
What’s UML • How to integrate UML • UML’s Issues as a Design Language • Origins of UML • Goals of UML • UML and Applicable Application • Why Defact Standard? What's UML
´97.12 OMG Standard UML 1.1 UML 1.0 ´96.121.0 Open UML 0.9 & 0.91 ´96.1 & ´96.10 feedback UML Partnres Unified Method 0.8 OOPSLA ´95 Booch ´93 OMT - 2 Other methods Booch ´91 OMT - 1 OOSE UML 2.0 How to Integrate UML UML 1.4 UML 1.3 commercial standardize integration chaotic What's UML
UML Issues • Unify Booch, OMT, OOSE(Objectory) • Meta-Model : Key concept of modeling • Contribute Software Development • Large Scale System Development • Java, C++, Smalltalk, Ada, VB, PB, ... • Distributed and Parallel、Multi-threads • Design Pattern • Componentware • Business modeling • More simpler What's UML
Origins of UML Booch Rumbaugh Jacobson Fusion Meyer Description of system operation numbering messages Pre/Post condition UML Embley Harel Singleton class high level view Statechart Wirfs-Brock Gamma, et.al responnsibility Shlaer - Mellor Odell Framework、 Pattern、Note Object LifeCycle Dynamics Classification Multiple Classification What's UML
Goals of UML • Unify the software development methodologies • Extension of Booch、OMT,Objectory • Integration of Traditional Notations and Diagrams • Notations and Specifications Opened • OMG,Defact Standard • Extension and Customization with Stereo-type • Applicable to the real world • Consistent representation through Requirement, Analysis, Design and Test • Large scale system development • Notations for the standard OO development processes What's UML
UML from Development Process • Redesign based on 2nd Generation methodology • Integration using Meta-Model • Collect good features from the existing methodologies • For the large scale systems • Package and its Hierarchy, Interface Concept • Structure and Function/Behabior • Objects(Structure and Behavior), Components • Use Case(External Functions), Patterns • Power to support all Development Processes • Represent Architectures(4+1 Views) What's UML
Unify ? What ? • Many existing methodologies • Integration of Modeling Notations • Many Application Domains • Integration of Specification Description and System Description Styles • Integration of Components that are the result of Software Development and Entities of models • But, not to Unify Development Processes What's UML
Scope of UML • Business Modeling • Requirement Definitions • Domain Analysis • Architecture Definitions • Design • Represent of Implementations(Reverse model) • Modeling of objects to be tested • Modeling of Objects to be managed • etc…. What's UML
Out of the Scope of UML • Business:Strategies, planning, Intension • Requirement:Semantics definitions, management of requirements, Risk,.. • Architecture:Constrains among diagrams,... • Design:Policy, Time constrains, Usability, .. • Implementations:Program codes, … • Test:Plan, Test Cases, Test Scripts • Configuration and Version Management • Free hand sketches on the white board • Flexible interaction feeling with Break Downs What's UML
Why UML becomed de-fact ? • Good timing after methodology’s war • Good collections from the practices • Great three Amigo • Booch, Yacobson, Runbaugh • Rational Software • Good support • Semantics definitions sacrificing rigorous • Make up a powerful community • Easy to introduce it at first,,,, What's UML
Contents : UML Diagrams • Diagrams • take a look of 10 diagrams • Relationships between Diagrams UML Diagrams
UML Diagrams UML Diagrams
Requirement Diagram • Use Case • to represent system functional capabilities from the users’ viewpoint UML Diagrams
Use Case Diagram Manage Customers Order Receiver Order Products System Manager Manage Product Information Stock Keeper Control Stocks UML Diagrams
Structure Diagrams • Class Diagram • Static Structures of Classes • Object Diagram • Snapshot of the Class, that’s the relationship among Instances • Package Diagram • Special Cases of the Class UML Diagramsa
Class Diagram Order Customer Order No. +OrderCustomer name Order Date address Total no. 0..* 0..* Deliver Plan 1 telphone Deliver date 1..* 1..* +Detaillist Product Detail +OrderProduct ID Title amount genre subtotal 1 1 Price Video CD GameSoftware Director Device name Artist name Hero UML Diagrams
Object Diagram Sato-san : Customer :Item Blade Runner : Video : Order : Item Imagine : CD UML Diagrams
Package Diagram Sales Management Product Management Inventory Control UML Diagrams
UML Diagrams • Behavior Diagrams • Interaction Diagram:Sequence, Collaboration • Collaborations among Objects • Activity Diagram • Flow of Jobs and Processes • State Chart Diagrams • State Transitions of Objects in the Life Cycle UML Diagrams
Sequence Diagram : Products Inventory : Receiving : Inventory : Order : Inout orders Manager Manager : Receive&Order Input Orders Confirm stocks Stock:=Confirm stocks Stock:=Confirm stocks Entry orders Entry orders Check goods stock Check goods stock <<create>> Set up Data UML Diagrams
Collaboration Diagram 1: Input Orders 2: Confirm goods stock 8: Apply Stocks 5: [Stock]Register Orders 3: No Stock:=Check Stocks :Goods stock : Inventory Manager : Order Entry : Receive&Order 7: Apply Stocks 4: Stock:=Check stocks 6: Register Orders : Goods Stocks : Receiving Manager : Orders 9: <<create>> 10: Set up Data UML Diagrams
Inventory Center Sales Accounting Receive Orders ける Send bills Check Goods Stock Check Payment Deliver Check Deliver Goods End of Receiving Activity Diagram UML Diagrams
Receiving Confirmation Deliver[Absence] 未納品 Not Deliver Deliver[ get signature ] Apply stock[ Stock shortage ] 納品完了 End of deliver Apply stocks[stocks] / deliver Order Entry Pre-Receiving --------------------------------------------- 入金完了 End of Payment Payment Date[No payment ] Cancel Payment Date[ Payment ] Cancel[ not deliver ] 未入金 No Payment State-chart Diagram UML Diagrams
Implementation Diagram • Component Diagram • Software Physical Structure • Dependence relationships among Software Modules • Deployment Diagram • Deployment structures of Components and Objects • Interfaces among Nodes UML Diagrams
Component Diagram UML Diagrams
:Cache :Product Mngmnt System Register <<TCP/IP>> <<USB>> :Bar Code Reader Deployment Diagram UML Diagrams
Enough to Understand it ? • What’s Meaning ? • Meaning of Icons to use • To share meanings with other people • To understand the invariant and the variant part • Relationships among many Diagrams ? UML Diagrams
Sequence and Collaboration • Interaction Diagram • Sequence Diagram • Collaboration Diagram UML Diagrams
Sequence and State-Chart • Objects Lifecycle • State-chart Diagram • State Transition and Action by Events b11:ClassB a01:ClassA c1:ClassC <<create>> do Activity1 Input Event a Output Event p Action opX Input Evebt b Output Event q Output Event r do Activity2 Input Event c Action opY Output Event s do Activity3 <<destroy>> Output Event t UML Diagrams
State-Chat Diagram and Component Specification • Protocol of Object Behavior • Input Event and Output Event of Action a01:ClassA <<create>> doActivity1 Input Evebt a Output Event p Action opX Input Event b Output Event q Output Event r do Activity2 Input Event c Action opY Output Event s do Activity3 <<destroy>> Output Event t UML Diagrams
Objects Interaction and Objects Lifecycle obj2 S1 e1 obj4 e1(self ) S2 do/ send m1() obj1 m1() m2(obj1) e2/send m2(obj1) e2 S3 obj3 obj5 m3() m4() UML Diagrams
Usecase and Collaborations • Realization relationships between Use case and Collaborations Collaboration XC1 Usecase X Collaboration XC2 UML Diagrams
Collaboration and MVC Pattern • Collaboration as Usecase implementation:MVC architecture and Robustness analysis • View:Boundary obj/ an Actor • Control:Controller obj/ a collaboration • Entity obj as Domain knowledge representation Control View Actor Model System Environment UML Diagrams
Stepwise Understanding UML • Model Elements • Relationships • Common mechanism • Diagram • Multiple Views of Architectures Stepwise Understanding UML
Model Elements Class/Object Interface Collaboration Use case Process/Shred Component Interaction State machine Node Package Note Stepwise Understanding UML
UML Basic Terms UML Things Diagrams Relationships Structure Behavior Group Annotation Use Case Class Object Sequence Collaboration State Chart Activity Component Deployment Package Model Subsystem Use Case Class Roll Data Type Active Class Interface Components Collaboration Node Event Interaction State- machine Action Activity Note Dependency Association Generalization Flow Realization Stepwise Understanding UML
Structural Model Elements • Class • A set of Objects that have common structure and behavior • Interface • External opened operations of objects • Collaboration • Collaboration among object groups • Use Case • Named system behaviors that be implemented by Collaborations Stepwise Understanding UML
Structural Model Elements • Active Class • Active Classes with Process/Shred • Parallel with other Classes • Component • Reusable parts that are logical and physical • Node • Abstraction of hardware devices that software components deploy and work on Stepwise Understanding UML
Behavior Model Elements • Interaction • Message passing among Objects and Trigger of State transitions • State Machine • Action/Activity of Object Lifecycle msg Stepwise Understanding UML
Group and Annotation Model Elements • Package • Container of Model Elements • Note • Text description units of Comments, Explanations, Annotations and etc... Stepwise Understanding UML
Relationships • Association Semantic relationships between the two instances • Generalization Relationships between model elements andits sub-model elements (inheritance) • Dependency Use other model elements • Realization Relationships between Requirements, Specification, Definition and Implementation, methods R r1 r2 Stepwise Understanding UML
Semantics Rules of UML • Name:name of the element • Scope:Context in case of naming • Visibility:way of using names • to be able to see and use or not • Integration:to integrate with other elements • Run:Meaning of the result of the executable models Stepwise Understanding UML
Common UML Mechanism • Binary Classification • Class - Object • Deference between Type and Instance • Interface - Implementation • Extension Mechanism • Stereotype <<Keyword>> • Tagged Value (Property name=Value) • Constrains {satisfied condition,proposition} Stepwise Understanding UML
UML Diagram Composition • Structure Diagram • Class Diagram (including Package diagram) • Object Diagram • Behavior Diagram • Use case Diagram • Sequence Diagram • Collaboration Diagram • State chart Diagram • Activity Diagram • Implementation Diagram • Component Diagram • Deployment Diagram Stepwise Understanding UML
Structure Diagram • Class Diagram • A set of components: Class and its relations • Object Diagram • Snap shot of the system at one time • Package Diagram • Model Configuration management • Variations of Classes Stepwise Understanding UML
Behavior Diagram • Use Case Diagram • External functional capabilities of the system • Sequence Diagram • time sequence of interactive objects • Collaboration Diagram • Interaction of object groups • State Chart Diagram • State transition, that’s Object life history • Activity Diagram • Control flow of the process for one interaction Stepwise Understanding UML
Implementation Diagram • Component Diagram • Dependency among Software Units • Deployment Diagram • Distributed deployment and interactions of components and objects on the computational nodes such as CPU, Process and Devices) Stepwise Understanding UML
Architecture and 4+1Views ○End Users Vocabulary and Concept Requirements/Functionality ○Programmer SW CFM Dev. Artifacts Mngmnt (Implement View) (Design View) LogicalView ComponentView ○Analyst ○Tester Use Case/Scenario View ○Project Mgr ○Architect Behavior Dev. Unit Parallel View Deployment View ○System Engineer Distributed Topology Deliver、Install Communication Network ○System Integrator Performance Scalability Through put Stepwise Understanding UML