Uml

9,852 views

Published on

Introduction to Unified Modeling Language (UML)

Published in: Technology
0 Comments
11 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
9,852
On SlideShare
0
From Embeds
0
Number of Embeds
158
Actions
Shares
0
Downloads
776
Comments
0
Likes
11
Embeds 0
No embeds

No notes for slide

Uml

  1. 1. Unified Modeling Language UML Parag Shah Twitter: @coding_insights
  2. 2. Modeling Most manufacturing and building processes require the creation of a model before the actual product is created.
  3. 3. Models in architecture
  4. 4. Automobile models
  5. 5. Why is modeling important ? <ul>For better communication among stake holders </ul>
  6. 6. Why is modeling important ? <ul>For documenting high level design decisions </ul>
  7. 7. Why is modeling important ? <ul>For risk reduction </ul>
  8. 8. Why is modeling important ? <ul>For what-if analysis </ul>
  9. 9. Why is modeling important ? <ul>Allows re-use of design components and patterns across projects </ul>
  10. 10. Why is modeling important ? <ul>If you don't do modeling, you may have to ... </ul>
  11. 11. Different views of a system <ul>Every system can be viewed from multiple perspectives or views </ul>
  12. 12. Different views of a system
  13. 13. Different views of a system
  14. 14. Views in a software system <ul><li>Modules
  15. 15. Classes and their relations
  16. 16. Real time interactions
  17. 17. Data flow
  18. 18. Deployment
  19. 19. User Interface
  20. 20. … etc </li></ul>
  21. 21. Many modeling languages <ul><li>Between 1970 and late 1980's many people experimented with modeling techniques and notations
  22. 22. Some popular notations </li><ul><li>Booch
  23. 23. OMT
  24. 24. OOSE (object oriented software engineering methodology – Ivar Jacobsen) </li></ul><li>Clearly unification was required </li></ul>
  25. 25. Unification <ul><li>In 1994 Grady Booch and James Rumbaugh started unifying Booch and OMT at Rational Corporation
  26. 26. In 1995 Ivar Jacobsen joined them and started merging OOSE
  27. 27. The unification resulted in UML 0.9 in 1996 </li></ul>
  28. 28. UML <ul><li>Managed by the OMG
  29. 29. Set of rules and notations for specifying a software system
  30. 30. The notation is graphical and extensible </li></ul>
  31. 31. UML Diagrams <ul><li>Structural diagrams
  32. 32. Behavioral diagrams
  33. 33. Interaction diagrams </li></ul>
  34. 34. UML Structural Diagrams <ul><li>Class diagram
  35. 35. Object diagram
  36. 36. Component diagram
  37. 37. Composite structure diagram
  38. 38. Package diagram
  39. 39. Deployment diagram </li></ul>
  40. 40. UML Behavioral Diagrams <ul><li>Use case diagram
  41. 41. Activity diagram
  42. 42. State machine diagram </li></ul>
  43. 43. UML Interactions Diagrams <ul><li>Sequence diagrams
  44. 44. Communication diagrams
  45. 45. Interaction overview diagrams </li></ul>
  46. 46. UML Structural Diagrams <ul>Structural diagrams depict structural aspects (static relationships) of a system </ul>
  47. 47. Class Diagrams Class diagrams represent the static structure of the classes in the software system, and illustrate attributes, operations, and relationships between the classes.
  48. 48. Class Diagrams – A class Person - name: String - age: int + toString: String Name Attributes Operations
  49. 49. Class Diagrams <ul><li>Class diagrams are also used to denote dependencies </li><ul><li>Weak dependency … USES-A
  50. 50. Association … HAS-A
  51. 51. Aggregation … OWNS-A
  52. 52. Composition … Stronger OWNS-A
  53. 53. Generalization / inheritance … IS-A, IS-LIKE-A </li></ul></ul>
  54. 54. Class Diagrams <ul><li>Associations </li></ul>
  55. 55. Class Diagrams <ul><li>Composition is a stronger association </li></ul>
  56. 56. Class Diagrams <ul><li>Inheritance </li></ul>
  57. 57. Object Diagrams Object diagrams provide information about the relationships between instances of classes at a particular point in time.
  58. 58. Object Diagrams org1:Organization emp1:Employee + Id: 200010
  59. 59. Component Diagrams <ul><li>Component diagrams show how the components of a system relate to each other
  60. 60. Components are at a higher level of abstraction than classes
  61. 61. Components usually consist of multiple classes </li></ul>
  62. 62. Component Diagrams <ul><li>Acknowledgement – Many thanks to Scott Ambler for giving me permission to use this diagram from his article on UML 2 Component Diagrams </li></ul>
  63. 63. Composite Structure Diagrams <ul><li>Composite structure diagrams show the internal structure of a class and the collaborations that are made possible </li></ul>
  64. 64. Composite Structure Diagrams
  65. 65. Package Diagrams <ul><li>Package diagrams show the organization of namespaces in a software system
  66. 66. Package diagrams show us how the software system is divided into packages and the dependencies among them
  67. 67. Package diagrams can show us a very high level view of components, layers, and dependencies in a software system </li></ul>
  68. 68. Package Diagrams Source: http://en.wikipedia.org/wiki/File:Package_Diagram.PNG
  69. 69. Behavioral Diagrams <ul><li>Behavioral diagrams depict behavioral aspects of a system
  70. 70. Diagrams </li><ul><li>Use Case Diagrams
  71. 71. Activity Diagrams
  72. 72. State Machine Diagrams </li></ul></ul>
  73. 73. Use Case Diagrams Use case diagrams show the interactions of users and external entities with the system being created. They are very good for depicting high level requirements of a system.
  74. 74. Use Case Diagrams Actor Use Case Boundary LogIn
  75. 75. Use Case Diagrams
  76. 76. Use Case Diagrams Use cases can also extend and include other use cases
  77. 77. Activity Diagrams Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency. - Wikipedia
  78. 78. Activity Diagrams
  79. 79. State Machine Diagrams State machine diagrams are used to depict the state transitions of a single object in response to events. They are modeled in a similar way as activity diagrams.
  80. 80. Interaction Diagrams <ul><li>Interaction diagrams depict the interactions in a system </li><ul><li>Sequence diagrams
  81. 81. Communication diagrams
  82. 82. Interaction overview diagrams </li></ul></ul>
  83. 83. Sequence Diagrams <ul>Sequence diagrams show how entities in a system interact including the messages that are passed in the order of execution </ul>
  84. 84. Sequence Diagrams - Entities Actor – represents external entities in the system. They could be human or external systems. General lifeline, represents an individual entity Entity, represents beans, and other objects that hold data or information. Boundary element, represents elements at the boundary of a system, such as UI elements or backend logic which deals with external systems. Control element, manages the flow of control for a scenario.
  85. 85. Sequence Diagrams - Messages Synchronous message Asynchronous message Self message
  86. 86. Sequence Diagram - Fragments Fragments are sections of logic which are executed given a particular condition.
  87. 87. Sequence Diagram
  88. 88. Communication Diagrams Communication diagrams (aka collaboration diagram) are similar to sequence diagrams, but they do not have lifelines, and are more free form in nature. The focus is usually object relationships between boundary, control, and entity types.
  89. 89. Communication Diagrams
  90. 90. Interaction Overview Diagrams Interaction overview diagram is a special type of activity diagram, where each node is a link to another type of interaction diagram.
  91. 91. Interaction Overview Diagrams
  92. 92. Summary <ul><li>What is a model ?
  93. 93. Reasons for modeling any system
  94. 94. UML is the unification of several modeling languages </li></ul>
  95. 95. Summary <ul><li>UML diagrams </li><ul><li>Structural diagrams </li><ul><li>Diagrams: class, object, component, composite structure, package, deployment diagram </li></ul><li>Behavioral diagrams </li><ul><li>Diagrams: use case, activity, state machine diagrams </li></ul><li>Interaction diagrams </li><ul><li>Diagrams: sequence, communication, interaction overview </li></ul></ul></ul>
  96. 96. Resources <ul><li>Several articles on UML by Scott Ambler - http://www.agilemodeling.com/artifacts/
  97. 97. UML quick reference by Allen Holub - http://www.holub.com/goodies/uml/
  98. 98. Cetus links on UML - http://www.cetus-links.org/oo_uml.html </li></ul>

×