Presentation is loading. Please wait.

Presentation is loading. Please wait.

UML Overview Unified Modeling Language Basic Concepts.

Similar presentations


Presentation on theme: "UML Overview Unified Modeling Language Basic Concepts."— Presentation transcript:

1 UML Overview Unified Modeling Language Basic Concepts

2 UML Overview What is the UML*? UML stands for Unified Modeling Language The UML combines concepts & best practices from: –Data Modeling concepts (Entity Relationship Diagrams) –Business Modeling (Work Flow) –Object Modeling –Component Modeling The UML is a common language for specifying, visualizing, documenting and constructing the artifacts of software-intensive systems 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 Overview 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 Overview 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 Overview 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

6 UML Overview UML: Basic Types of Concepts Modeling elements Relationships Diagrams

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

8 UML Overview 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

9 UML Overview 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

10 UML Overview 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)

11 UML Overview 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

12 UML Overview Basic Relationship Types Association Dependency Aggregation/Composition Generalization Realization

13 UML Overview Copyright © 1997 by Rational Software Corporation Relationships: Defined Association - a bi-directional connection between classes –An association is shown as a line connecting the related classes Aggregation and (more precisely defined) composition - stronger forms of relationship where the relationship is between a whole and its parts; often generically called “aggregation/decomposition” of “part of” –An aggregation is shown as a line connecting the related classes with a diamond next to the class representing the aggregate (the whole) –A composition is shown as a line connecting the related classes with a filled in diamond next to the class representing aggregate (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

14 UML Overview 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

15 UML Overview Relationships: Notation Association Dependency Aggregation, composition Generalization Realization type Implementation class Subclass Superclass Supplier Client name Aggregate Part AggregationComposition

16 UML Overview Aggregation

17 UML Overview Models and Essential 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 See Scotch Ambler’s page for a complete list of UML 2 diagrams” http://www.agilemodeling.com/essays/umlDiagrams.htmhttp://www.agilemodeling.com/essays/umlDiagrams.htm

18 UML Overview 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

19 UML Overview 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

20 UML Overview 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

21 UML Overview Use Case Diagram Captures system functionality as seen by users

22 UML Overview 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

23 UML Overview Class Diagram Captures the vocabulary of a system

24 UML Overview 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

25 UML Overview 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

26 UML Overview Object Diagram Captures instances and links

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

28 UML Overview Component Diagram Captures the physical structure of the implementation

29 UML Overview 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

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

31 UML Overview 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

32 UML Overview Sequence Diagram Captures dynamic behavior (time-oriented)

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

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

35 UML Overview Collaboration Diagram Captures dynamic behavior (message- oriented)

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

37 UML Overview : 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

38 UML Overview Statechart Diagram Captures dynamic behavior (event-oriented)

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

40 UML Overview Activity Diagram Captures dynamic behavior (activity-oriented)

41 UML Overview 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

42 UML Overview References Martin Fowler, UML Distilled (3 rd edition), Addison-Wesley, 2004. Grady Booch, James Rumbaugh, Ivar Jacobson, The Unified Modeling Language User Guide, Addison-Wesley, 1999. UML documentation & papers - http://www- 01.ibm.com/software/rational/uml/http://www- 01.ibm.com/software/rational/uml/ “UML in Action,” Communications of the ACM, October 1999, V. 42, N. 10 Other resources: –What is new in UML2? (Scotch Ambler) http://drdobbs.com/architecture-and-design/184415097?cid=Ambysoft http://drdobbs.com/architecture-and-design/184415097?cid=Ambysoft –UML Cheatsheet: http://www.scribd.com/doc/399157/UML-20- Cheatsheethttp://www.scribd.com/doc/399157/UML-20- Cheatsheet –UML diagrams: http://www.agilemodeling.com/essays/umlDiagrams.htm http://www.agilemodeling.com/essays/umlDiagrams.htm

43 UML Overview Backup Slides

44 UML Overview UML 2 Diagrams

45 UML Overview SysML=13-6+2=9 Diagrams


Download ppt "UML Overview Unified Modeling Language Basic Concepts."

Similar presentations


Ads by Google