advanced modeling with uml n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Advanced Modeling with UML PowerPoint Presentation
Download Presentation
Advanced Modeling with UML

Loading in 2 Seconds...

play fullscreen
1 / 144

Advanced Modeling with UML - PowerPoint PPT Presentation


  • 155 Views
  • Updated on

Object Modeling with OMG UML Tutorial Series. Advanced Modeling with UML. Karin Palmkvist, Bran Selic, Jos Warmer and Nathan Dykman UML Revision Task Force.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

Advanced Modeling with UML


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
    Presentation Transcript
    1. Object Modeling with OMG UML Tutorial Series Advanced Modeling with UML Karin Palmkvist, Bran Selic, Jos Warmer and Nathan Dykman UML Revision Task Force © 1999-2001 OMG and Contributors: Crossmeta, EDS, IBM, Enea Data, Hewlett-Packard, IntelliCorp, Kabira Technologies, Klasse Objecten, Rational Software, Telelogic, Unisys

    2. Overview • Introduction • Advanced Modeling • Part 1: Model Management • Karin Palmkvist, Enea Data • Part 2: Extension Mechanisms and Profiles • Bran Selic, Rational Software • Nathan Dykman, Hewlett Packard • Part 3: Object Constraint Language (OCL) • Jos Warmer, Klasse Objecten • Bran Selic, Rational Software Advanced Modeling with UML

    3. Tutorial Series • Lecture 1: Introduction to UML: Structural and Use Case Modeling • Lecture 2: Behavioral Modeling with UML • Lecture 3: Advanced Modeling with UML [Note: This version of the tutorial series is based on OMG UML Specification v. 1.4, UML Revision Task Force recommended final draft, OMG doc# ad/01-02-13.] Advanced Modeling with UML

    4. Tutorial Focus: the Language • language = syntax + semantics • syntax = language elements (e.g. words) are assembled into expressions (e.g. phrases, clauses) • semantics = the meanings of the syntactic expressions • UML Notation Guide – defines UML’s graphic syntax • UML Semantics – defines UML’s semantics Advanced Modeling with UML

    5. «metamodel» UML Behavioral Elements Model Management dependency Foundation package UML Overview Advanced Modeling with UML

    6. Behavioral Elements Model Management Foundation Extension Mechanisms Core Data Types UML Overview Advanced Modeling with UML

    7. Behavioral Elements State Machines Activity Graphs Use Cases Collaborations Model Management Common Behavior Foundation UML Overview Advanced Modeling with UML

    8. Advanced Modeling with UML • Part 1: Model Management • Part 2: Extension Mechanisms and Profiles • Part 3: Object Constraint Language (OCL) Advanced Modeling with UML

    9. «metamodel» UML Behavioral Elements Model Management Foundation UML Overview Advanced Modeling with UML

    10. Model Management Overview • Main UML constructs used for model management: • Package • Subsystem • Model Advanced Modeling with UML

    11. Unifying Concepts • Packages, Subsystems, and Models • Group other model elements together • Each groups elements for a different reason (providing different semantics) • Other grouping elements in UML include: • Classes • Components Advanced Modeling with UML

    12. Package • What are Packages? • Core Concepts • Diagram Tour • When to Use Packages • Modeling Tips Advanced Modeling with UML

    13. Package A package is a grouping of model elements Advanced Modeling with UML

    14. Customer Order Location Item Order Item Stock Item Package – Example Sales Warehouse Advanced Modeling with UML

    15. Package • A package can contain model elements of different kinds • Including other packages to create hierarchies • A package defines a namespace for its contents • Packages can be used for various purposes Advanced Modeling with UML

    16. A grouping of model elements. Name A dependency indicating that the public contents of the target package are added to the namespace of the source package. «import» A dependency indicating that the public contents of the target package are available in the namespace of the source package. «access» Core Concepts Construct Description Syntax Package Import Access Advanced Modeling with UML

    17. Visibility • Each contained element has a visibility relative to the containing package • A public element is visible to elements outside the package, denoted by ‘+’ • A protected element is visible only to elements within inheriting packages, denoted by ‘#’ • A private element is not visible at all to elements outside the package, denoted by ‘-’ • Same syntax for visibility of attributes and operations in classes Advanced Modeling with UML

    18. +C B -D «import» A +E Y X Y::C +C B -D «import» A Y::E +E Import Y X The associations are owned by package X Advanced Modeling with UML

    19. same class Y X +B +Y::B B -D «import» +E A +Y::E Import – Alias An imported element can be given a local alias and a local visibility Y X +B B -D «import» A +E -C Advanced Modeling with UML

    20. +C B -D «access» A +E Y X «access» +C B -D +E A Access The associations are owned by package X Y X Advanced Modeling with UML

    21. Y::C B +F +Z::F +C -D «import» «import» Y::F -H +G +E -Z::G A Y::E Y Z X +F +C B -D «access» «access» -H +G A +E Import vs. Access Y Z X Advanced Modeling with UML

    22. Package Inheritance • A package with a generalization to another package inherits public and protected elements that are • owned or • imported by the inherited package Advanced Modeling with UML

    23. Diagram Tour • Packages are shown in static diagrams • Two equivalent ways to show containment: Advanced Modeling with UML

    24. When to Use Packages • To create an overview of a large set of model elements • To organize a large model • To group related elements • To separate namespaces Advanced Modeling with UML

    25. Modeling Tips – Package • Gather model elements with strong cohesion in one package • Keep model elements with low coupling in different packages • Minimize relationships, especially associations, between model elements in different packages • Namespace implication: an element imported into a package does not “know” how it is used in the imported package Advanced Modeling with UML

    26. Subsystem • What are Subsystems? • Core Concepts • Diagram Tour • When to Use Subsystems • Modeling Tips Advanced Modeling with UML

    27. Subsystem Subsystems are used for system decomposition Advanced Modeling with UML

    28. Communicating subsystems constitute a system Trunk Subscription Subsystem – Example Traffic Control Advanced Modeling with UML

    29. A grouping of model elements that represents a behavioral unit in a physical system. Name Core Concepts Construct Description Syntax Subsystem Advanced Modeling with UML

    30. Subsystem Aspects • A subsystem has two aspects: • An external view, showing the services provided by the subsystem • An internal view, showing the realization of the subsystem • There is a mapping between the two aspects Advanced Modeling with UML

    31. Subsystem Aspects A subsystem has a specification and a realization to represent the two views Specification elements Realization elements Advanced Modeling with UML

    32. Subsystem Realization • The subsystem realization defines the actual contents of the subsystem • The subsystem realization typically consists of classes and their relationships, or a contained hierarchy of subsystems with classes as leaves Specification elements Realization elements ? Advanced Modeling with UML

    33. Subsystem Specification The subsystem specification defines the external view of the subsystem Specification elements Realization elements ? Advanced Modeling with UML

    34. Subsystem Specification • The subsystem specification • describes the services offered by the subsystem • describes the externally experienced behavior of the subsystem • does not reveal the internal structure of the subsystem • describes the interface of the subsystem Advanced Modeling with UML

    35. Specification Techniques • The Use Case approach • The State Machine approach • The Logical Class approach • The Operation approach …and combinations of these. Advanced Modeling with UML

    36. Use Case Approach • For subsystem services used in certain sequences • When the specification is to be understood by non-technical people Realization elements Specification elements Advanced Modeling with UML

    37. Realization elements Change Digit Analysis Information Operator Initiate Call Trunk Receive Digit and Connect Hook Signal and Disconnect Subscription Use Case Approach – Example Traffic Control Specification elements Advanced Modeling with UML

    38. Stopped Running Maintenance Exhausted Error State Machine Approach • For subsystems with state dependent behavior Traffic Control Specification elements • Focuses on the states of the subsystem and the transitions between them Advanced Modeling with UML

    39. Number Dictionary Analyzer Network Manager Logical Class Approach • When usage of the subsystem is perceived as manipulation of objects Traffic Control Specification elements • When the requirements are guided by a particular standard Advanced Modeling with UML

    40. initiateConnection (…) dialledDigit (…) throughConnect (…) bAnswer (…) bOnHook (…) aOnHook (…) Operation Approach • For subsystems providing simple, “atomic” services Traffic Control Operations • When the operations are invoked independently Advanced Modeling with UML

    41. Initiate Call Trunk Receive Digit and Connect Hook Signal and Disconnect Subscription Mixing Techniques Traffic Control Specification elements Operations changeDigitAnalysisInformation (...) Specification elements Advanced Modeling with UML

    42. Operations Realization elements Specification elements Complete Subsystem Notation • The complete subsystem symbol has three pre-defined compartments • Each of the compartments may be optionally omitted from the diagram Advanced Modeling with UML

    43. Traffic Control Trunk Subscription Traffic Control Trunk Subscription Subsystem Interfaces Advanced Modeling with UML

    44. «Interface» «Interface» operation1( ) : Type1 operation1( ) operation2( ) operation2( ) «realize» operation2( ) : Type2 «realize» operation3( ) operation4( ) operation5( ) operation3( ) : Type3 operation4( ) : Type4 operation5( ) : Type5 Operations and Interfaces Operations The subsystem must support all operations in the offered interfaces Advanced Modeling with UML

    45. «Interface» «Interface» «realize» «realize» Subsystem Interfaces Specification elements An interface operation may alternatively be supported by a specification element of the subsystem Advanced Modeling with UML

    46. Specification – Realization • The specification and the realization must be consistent • The mapping between the specification and the realization can be expressed by: • realization relationships • collaborations Advanced Modeling with UML

    47. «realize» Realize Relationship Operations Realization Elements operation1( ) : Type1 operation1( ) operation2( ) : Type2 operation3( ) : Type3 operation4( ) : Type4 operation5( ) : Type5 Realization is particularly useful in simple mappings Advanced Modeling with UML

    48. «realize» Realize – Example Traffic Control Realization elements Operations changeDigitAnalysisInformation ( ) Specification elements Initiate Call changeDigitAnalysisInformation ( ) : : Trunk Receive Digit and Connect Hook Signal and Disconnect Subscription Advanced Modeling with UML

    49. Sequence Diagram Collaboration Diagram 2: dialledDigit :Trunk :Subscription :Traffic Control :Traffic Control markBusy dialledDigit 4: throughConnect dialledDigit :Trunk throughConnect markBusy :Subscription bAnswer 1: markBusy Collaboration • A collaboration defines the roles to be played when a task is performed • The roles are played by interacting instances 3: dialledDigit 6: bAnswer 5: markBusy Advanced Modeling with UML

    50. Collaboration role name role name Role role name role name Class Collaboration – Notation A collaboration and its participants Advanced Modeling with UML