An Introduction To UML:Unified Modeling Language<br />Chris RoederJune 2011<br />
Modeling<br />UML is  a graphical modeling language.<br />Drawing pictures of code<br />Helps to visualize high-level abst...
History<br />UML: Unified Modelling Language<br />Roots in work of “The Three Amigos”<br /> form early 90’s<br />Grady Boo...
Modeling is useful for:<br />A high-level description of the project<br />It does not contain code-level detail<br />Makes...
Static/Structural<br />Class Diagram<br />Shows classes and their relationships, both inheritance and composition<br />Obj...
Dynamic/Behavioral<br />Sequence Diagram<br />Shows method calls between objects in sequence<br />Use-Case Diagram<br />De...
Class Diagram<br />A class is a box and three sections:<br />Name<br />Members<br />Methods<br />Three kinds of arrows rad...
Aggregation and Containment<br />Aggregation<br />Weak<br />Catalog Containment<br />List<Item><br />Items’ lifetime may b...
Multiplicity<br />Add quantifiers to ends of aggregation and composition relationships<br />0..1 – optional<br />1 – must ...
Visibility<br />Characters used to show visibility<br />+ public<br />- private<br /># protected<br />~ package<br />_ sta...
Role Names<br />Can add role names to relationships<br />different name depending on perspective:<br />A is B’s parent, B ...
Sequence Diagram<br />Shows the interaction between objects<br />Objects are listed across the top in a single row<br />In...
Sequence Diagram 2<br />Conditional<br />[condition]<br />Opt<br />Alt<br />Repeated<br />*<br />loop<br />
Examples<br />CCP UIMA type system<br />CCP fileparsersproject<br />EntityTaggers from Code Review<br />CCP NLP Shims<br /...
Links<br />http://en.wikipedia.org/wiki/Unified_Modeling_Language<br />http://www.tracemodeler.com/articles/a_quick_introd...
Upcoming SlideShare
Loading in …5
×

Uml

515 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
515
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Uml

  1. 1. An Introduction To UML:Unified Modeling Language<br />Chris RoederJune 2011<br />
  2. 2. Modeling<br />UML is a graphical modeling language.<br />Drawing pictures of code<br />Helps to visualize high-level abstractions and collaborations<br />Limits detail<br />2 Major classes of diagrams<br />Static/Structural<br />Dynamic/Behavioral<br />Simplified version discussed here<br />
  3. 3. History<br />UML: Unified Modelling Language<br />Roots in work of “The Three Amigos”<br /> form early 90’s<br />Grady Booch: Rational Rose<br />Ivar Jacobsen: OOSE at Ericson<br />“yah-cob-son”<br />James Rumbaugh: Object Modelling Technique at GE<br />1.0 out in 1997<br />ISO standard in 2005<br />2.0 in 2005<br />2.4 in Beta<br />
  4. 4. Modeling is useful for:<br />A high-level description of the project<br />It does not contain code-level detail<br />Makes it easier to see the forest without all the trees in the way<br />A graphical presentation<br />Works better with some minds<br />It’s about drawing and using the diagrams<br />Doing design<br />Not about having the diagrams for their own sake<br />No Shelfware (gets written, sits on the shelf)<br />
  5. 5. Static/Structural<br />Class Diagram<br />Shows classes and their relationships, both inheritance and composition<br />Object Diagram<br />Shows instantiations of classes, objects, <br />at a specific point in time<br />Package Diagram<br />Deployment Diagram<br />(Others)<br />
  6. 6. Dynamic/Behavioral<br />Sequence Diagram<br />Shows method calls between objects in sequence<br />Use-Case Diagram<br />Describes activities in terms of actors, goals and dependencies<br />Activity Diagram<br />(others)<br />
  7. 7. Class Diagram<br />A class is a box and three sections:<br />Name<br />Members<br />Methods<br />Three kinds of arrows radiate out:<br />Inheritance: an arrow that points to the base class<br />Aggregation: a line starting with a hollow diamond that ends at the contained class: weak, catalog containment<br />Composition: a line starting with a filled diamond that ends at the contained class: stronger, includes lifecycle, physical containment<br />
  8. 8. Aggregation and Containment<br />Aggregation<br />Weak<br />Catalog Containment<br />List<Item><br />Items’ lifetime may be independent of catalog<br />Composition<br />Strong<br />A Car’s engine, tires, doors<br />Lifetime’s are related: No car, no engine<br />
  9. 9.
  10. 10. Multiplicity<br />Add quantifiers to ends of aggregation and composition relationships<br />0..1 – optional<br />1 – must have one<br />0..* - zero or more instances<br />1..* - at least one instance<br />Quantifiers can go on either or both ends of a relationship<br />
  11. 11. Visibility<br />Characters used to show visibility<br />+ public<br />- private<br /># protected<br />~ package<br />_ static<br />
  12. 12. Role Names<br />Can add role names to relationships<br />different name depending on perspective:<br />A is B’s parent, B is A’s child<br />A is B’s employer, B is A’s employee<br />
  13. 13. Sequence Diagram<br />Shows the interaction between objects<br />Objects are listed across the top in a single row<br />Interactions are labelled arrows between lines extending down from the objects<br />Very useful for mapping out an interaction when learning or debugging a new codebase.<br />Objects are instances of Classes in your Class Diagram<br />Editor picks up methods from the Class Diagram<br />Classes can be used in parameters and return types<br />
  14. 14.
  15. 15. Sequence Diagram 2<br />Conditional<br />[condition]<br />Opt<br />Alt<br />Repeated<br />*<br />loop<br />
  16. 16. Examples<br />CCP UIMA type system<br />CCP fileparsersproject<br />EntityTaggers from Code Review<br />CCP NLP Shims<br />Used to reverse engineer<br />
  17. 17. Links<br />http://en.wikipedia.org/wiki/Unified_Modeling_Language<br />http://www.tracemodeler.com/articles/a_quick_introduction_to_uml_sequence_diagrams/<br />

×