Presentation is loading. Please wait.

Presentation is loading. Please wait.

UML Unified Modeling Language Basic Concepts. UML What is the UML*? UML stands for Unified Modeling Language The UML combines the best of the best from:

Similar presentations


Presentation on theme: "UML Unified Modeling Language Basic Concepts. UML What is the UML*? UML stands for Unified Modeling Language The UML combines the best of the best from:"— Presentation transcript:

1 UML Unified Modeling Language Basic Concepts

2 UML What is the UML*? UML stands for Unified Modeling Language The UML combines the best of the best from: –Data Modeling concepts (Entity Relationship Diagrams) –Business Modeling (Work Flow) –Object Modeling –Component Modeling The UML is a standard language for specifying, visualizing, documenting and constructing the artifacts of a software-intensive system It can be used with all processes, throughout the development life cycle, and across different implementation technologies *Note: This presentation includes materials from Grady Booch, James Rumbaugh and Ivar Jacobson’s overviews on different aspects of UML available at http://www.rational.com/uml/resources

3 UML UML Heritage General-purpose OO modeling language –convergence of a number of popular OO methods OMT (Rumbaugh et al.) Booch OOSE (Jacobson et al.) UML 0.9 1996 CatalysisROOMetc. UML 1.1 Nov. 1997 UML 1.4 Mar. 1999 UML 2.0

4 UML Meyer Before and after conditions Harel Statecharts Gamma, et al Frameworks and patterns, HP Fusion Operation descriptions and message numbering Embley Singleton classes and high-level view Wirfs-Brock Responsibilities Odell Classification Shlaer - Mellor Object lifecycles Rumbaugh OMT Booch Booch method Jacobson OOSE Contributions to the UML

5 UML Creating the UML Booch methodOMT Unified Method 0.8 OOPSLA ´95 OOSE Other methods UML 0.9 Web - June ´96 public feedback Final submission to OMG, Sep ‘97 First submission to OMG, Jan ´97 UML 1.1 OMG Acceptance, Nov 1997 UML 1.3 UML 1.0 UML partners UML 1.4 UML 2.0 Planned major revision, 2001 (UML 2.0)

6 UML UML Usage: Overview The UML may be used to: –Represent the Elements of a system or a domain and their Relationships in a Static Structure using class and object diagrams –Model the Behavior of objects with state transition diagrams –Reveal the Physical Implementation Architecture with component & deployment diagrams –Display the Boundary of a System & its major Functions using use cases and actors –Illustrate Use Case Realizations with interaction diagrams

7 UML Provides a uniform modeling formalism and a set of (object-oriented) constructs (notation) for representing the elements of a domain of interest as well as their relationships in a Static Structural Model Use Cases can be used to model usage Example (DMTF, IETF): development of a common model to serve as an underlying information framework for the specification of a common directory schema; the common model & schema support the operation of multiple applications and systems in the enterprise UML for Information Modeling

8 UML UML: Basic Types of Concepts Modeling elements Relationships Diagrams

9 UML Basic Modeling Elements Structural elements –type, class, instance, collaboration, use case, component, node Behavioral elements –interaction, state machine Grouping elements –package, subsystem

10 UML Classes and Instances Telephone busy : boolean offHook() onHook () ring() Specifications for one or more distinct objects with a common form (structure and behavior) phone1:Telephone busy = true offHook() onHook () ring() phone2:Telephone busy = false offHook() onHook () ring() instance class

11 UML Attributes The data/static structure aspect of a class is represented by its attributes Attributes may be found by examining class definitions, the problem requirements, and by applying domain knowledge Each course offering has a number, location and time CourseOffering number location time

12 UML Operations The behavior of a class is represented by its operations Operations may be found by examining interaction diagrams registration form registration manager addCourse(joe, math 01) RegistrationManager addCourse(Student,Course)

13 UML Copyright © 1997 by Rational Software Corporation Relationships Relationships provide a pathway for communication between objects Sequence and/or collaboration diagrams are examined to determine what links between objects need to exist to accomplish the behavior -- if two objects need to “talk” there must be a link between them

14 UML Basic Relationship Types Association Dependency Aggregation Generalization Realization

15 UML Copyright © 1997 by Rational Software Corporation Relationships: Defined An association is a bi-directional connection between classes –An association is shown as a line connecting the related classes An aggregation is a stronger form of relationship where the relationship is between a whole and its parts –An aggregation is shown as a line connecting the related classes with a diamond next to the class representing the whole A dependency relationship is a weaker form of relationship showing a relationship between a client and a supplier where the client does not have semantic knowledge of the supplier. –A dependency is shown as a dashed line pointing from the client to the supplier

16 UML Copyright © 1997 by Rational Software Corporation Generalization (Inheritance) A generalization is a relationship between a more general and a more specific element –Inheritance is the main property of generalization- specialization relationships defined between a superclass and its subclasses –Common attributes, operations, and/or relationships are shown at the highest applicable level in the hierarchy Realization is a relationship defined between a type and its implementation classes

17 UML Relationships: Notation Association Dependency Aggregation Generalization Realization type Implementation class Subclass Superclass Aggregate Part Supplier Client name

18 UML Models and Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Collaboration Diagrams State Diagrams State Diagrams Component Diagrams Component Diagrams Component Diagrams Deployment Diagrams State Diagrams State Diagrams Object Diagrams Scenario Diagrams Scenario Diagrams Statechart Diagrams Use Case Diagrams Use Case Diagrams Sequence Diagrams State Diagrams State Diagrams Class Diagrams Activity Diagrams A model is a complete description of a system from a particular perspective Models

19 UML Why Build Models? To understand the problem better To communicate with stakeholders To find errors or omissions To plan out the design To generate code

20 UML UML Model Views Requirements (use case diagrams) Static structure (class diagrams) –kinds of objects and their relationships Dynamic behavior (state machines) –possible life histories of an object Interactive behavior (activity, sequence, and collaboration diagrams) –flow of control among objects to achieve system- level behavior Physical implementation structures (component and deployment diagrams) –software modules and deployment on physical nodes

21 UML Diagrams A diagram is a view into a model –Presented from the aspect of a particular stakeholder –Provides a partial representation of the system –Is semantically consistent with other views In the UML, there are nine standard diagrams –Static views: use case, class, object, component, deployment –Dynamic views: sequence, collaboration, statechart, activity

22 UML Use Case Diagram Captures system functionality as seen by users

23 UML Use Case Diagram Captures system functionality as seen by users Built in early stages of development Purpose –Specify the context of a system –Capture the requirements of a system –Validate a system’s architecture –Drive implementation and generate test cases Developed by analysts and domain experts

24 UML Class Diagram Captures the vocabulary of a system

25 UML Class Diagram Captures the vocabulary of a system Built and refined throughout development Purpose –Name and model concepts in the system –Specify collaborations –Specify logical database schemas Developed by analysts, designers, and implementers

26 UML Class Diagram: Example Shows the entities in a system and their general relationships generalization association Person House residence0..* owner0..* Financial Institution clientcreditor 0..* Bank Trust Company

27 UML Object Diagram Captures instances and links

28 UML Object Diagram Shows instances and links Built during analysis and design Purpose –Illustrate data/object structures –Specify snapshots Developed by analysts, designers, and implementers

29 UML Component Diagram Captures the physical structure of the implementation

30 UML Component Diagram Captures the physical structure of the implementation Built as part of architectural specification Purpose –Organize source code –Construct an executable release –Specify a physical database Developed by architects and programmers

31 UML Deployment Diagram Captures the topology of a system’s hardware

32 UML Deployment Diagram Captures the topology of a system’s hardware Built as part of architectural specification Purpose –Specify the distribution of components –Identify performance bottlenecks Developed by architects, networking engineers, and system engineers

33 UML Sequence Diagram Captures dynamic behavior (time-oriented)

34 UML Sequence Diagram Captures dynamic behavior (time-oriented) Purpose –Model flow of control –Illustrate typical scenarios

35 UML Sequence Diagram: ExampleCallerOperatorCallee Assertions of legal interactions between objects (e.g., operator-assisted call) time call ack number call ack talk transfer sequence diagram

36 UML Collaboration Diagram Captures dynamic behavior (message- oriented)

37 UML Collaboration Diagram Captures dynamic behavior (message- oriented) Purpose –Model flow of control –Illustrate coordination of object structure and control

38 UML : Registrar course form : CourseForm theManager : CurriculumManager aCourse : Course 1: set course info 2: process 3: add course 4: new course Collaboration Diagram: Example A collaboration diagram displays object interactions organized around objects and their links to one another

39 UML Statechart Diagram Captures dynamic behavior (event-oriented)

40 UML Statechart Diagram Captures dynamic behavior (event-oriented) Purpose –Model object lifecycle –Model reactive objects (user interfaces, devices, etc.)

41 UML Activity Diagram Captures dynamic behavior (activity-oriented)

42 UML Summary: the UML An industry standard for analysis and design of object-oriented systems –based on extensive experience and best practices –gaining rapid acceptance (training, tools, books) Comprises: –set of modeling concepts –graphical notation Concepts are organized into diagram types –class, state machine, collaboration, use case, sequence, activity, component, deployment The UML can be used in many different domains to capture domain-specific concepts and ideas

43 UML References Grady Booch, James Rumbaugh, Ivar Jacobson, The Unified Modeling Language User Guide, Addison-Wesley, 1999. UML documentation - http://www.rational.com/uml/resources “UML in Action,” Communications of the ACM, October 1999, V. 42, N. 10 Whitepapers: –(1) "Why Use the UML?" by Martin Fowler –(2) "How the UML Models Fit Together," by Scot Ambler –(3) "UML Applied: Nine Tips to Incorporating UML into Your Project" by D. Rosenberg –(1),(2) and (3) are available at http://www.sdmagazine.com/uml (Focus on UML). –There are several whitepapers on UML available at “The UML Home” http://www.rational.com/uml/resources/whitepapers -


Download ppt "UML Unified Modeling Language Basic Concepts. UML What is the UML*? UML stands for Unified Modeling Language The UML combines the best of the best from:"

Similar presentations


Ads by Google