Your SlideShare is downloading. ×
0
UML and You:Communicating with your community           David Haskins
Quick Side Note: “The” UMLI refuse to refer to it as “the” UML. I will simplyrefer to the topic as “UML.”
Who created UML?• Created by the Object Management Group in  around 1997.• UML is a consolidation of various competing  mo...
What is UML?• A graphical modeling language.• UML means “Unified Modeling Language”.• Consists of 14 types of diagrams.  –...
Why use UML?•   A standard way to communicate ideas•   Use as a sketch•   Use as a blueprint•   Use UML as a programming l...
Why use UML?I suggest you use it as a sketch.
Most Common UML Diagrams• Use Case Diagrams• Class Diagrams• Sequence Diagrams
DiagramBehavior Diagram                             Structure DiagramActivity   Use    State   Interaction        Class Co...
Use Case Diagram• Very similar to “user stories” in XP, but  generally more detailed.• Includes alternatives to success.
Use Case Diagram (example)BUY A PRODUCT•Main Success:  1. Customer browses catalog and selects items  2. Customer chooses ...
Use Case Diagram (example)• Extensions:  3a. Customer is repeat visitor      .1 System displays default user address      ...
Use Case Diagram (example)                         Browse Catalog                         Checkout              Records Tr...
Classes vs ObjectsWhat’s the difference between                      a Class and an Object?
Class Diagrams    OrderdateReceivedisPrepaidtotalPriceshippingChargeitemsplaceOrder()closeOrder()
Class Diagrams            Order+ dateReceived: Date[1]- isPrepaid: Boolean [0..1]+ totalPrice: Float[1]# shippingCharge: F...
Class Diagrams                         Order                                   Class name+ dateReceived: Date[1]- isPrepai...
Class Diagrams (associations)    Order                 LineItemdateReceived          itemIdisPrepaid           * inStockto...
Class Diagrams (generalization)                         Order                  orderId                  price             ...
Class Diagrams (aggregation)                         Inventory   Item              quantity                     restockIDi...
Aggregation“Think of it as a modeling placebo”  – Jim Rumbaugh
Class Diagrams (composition)                        Inventory   Item             quantity                    restockIDitem...
Sequence DiagramsShows how objects interact with each other
anOrder                      aLineItem                           aProduct   aCustomercalculatePrice()                     ...
DiagramBehavior Diagram                             Structure DiagramActivity   Use    State   Interaction        Class Co...
Interested in More?
UML and You
UML and You
UML and You
UML and You
Upcoming SlideShare
Loading in...5
×

UML and You

233

Published on

A talk I gave on UML in September to the Memphis PHP user group.

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

  • Be the first to like this

No Downloads
Views
Total Views
233
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "UML and You"

  1. 1. UML and You:Communicating with your community David Haskins
  2. 2. Quick Side Note: “The” UMLI refuse to refer to it as “the” UML. I will simplyrefer to the topic as “UML.”
  3. 3. Who created UML?• Created by the Object Management Group in around 1997.• UML is a consolidation of various competing modeling languages.• James Rumbaugh, Grady Booch, and Ivar Jacobson – collectively known as “The Three Amigos.”
  4. 4. What is UML?• A graphical modeling language.• UML means “Unified Modeling Language”.• Consists of 14 types of diagrams. – Structural diagrams – Behavioral diagrams• UML modeling tools can be found in Eclipse, NetBeans, and Visual Studio.
  5. 5. Why use UML?• A standard way to communicate ideas• Use as a sketch• Use as a blueprint• Use UML as a programming language. UML can be compiled into an application. (don’t do this)
  6. 6. Why use UML?I suggest you use it as a sketch.
  7. 7. Most Common UML Diagrams• Use Case Diagrams• Class Diagrams• Sequence Diagrams
  8. 8. DiagramBehavior Diagram Structure DiagramActivity Use State Interaction Class Composite Structure Object Case Machine Timing Interaction Communication Sequence Package Deployment Component Overview
  9. 9. Use Case Diagram• Very similar to “user stories” in XP, but generally more detailed.• Includes alternatives to success.
  10. 10. Use Case Diagram (example)BUY A PRODUCT•Main Success: 1. Customer browses catalog and selects items 2. Customer chooses to checkout 3. Customer fills in shipping information 4. …. 10. System sends confirmation e-mail to customer
  11. 11. Use Case Diagram (example)• Extensions: 3a. Customer is repeat visitor .1 System displays default user address .2 Customer chooses to use existing address or enter a new address 10a. System receives bounce back from bad e-mail address. .1 System alerts supervisor to attempt to call customer.
  12. 12. Use Case Diagram (example) Browse Catalog Checkout Records Transaction Enter Shipping InfoCustomer Calls Customer AccountingSystem Supervisor
  13. 13. Classes vs ObjectsWhat’s the difference between a Class and an Object?
  14. 14. Class Diagrams OrderdateReceivedisPrepaidtotalPriceshippingChargeitemsplaceOrder()closeOrder()
  15. 15. Class Diagrams Order+ dateReceived: Date[1]- isPrepaid: Boolean [0..1]+ totalPrice: Float[1]# shippingCharge: Float [1]+ items: LineItem [*]+ placeOrder(int: orderId): Boolean+ closeOrder(): Boolean
  16. 16. Class Diagrams Order Class name+ dateReceived: Date[1]- isPrepaid: Boolean [0..1]+ totalPrice: Float[1] Attributes# shippingCharge: Float [1]+ items: LineItem [*]+ placeOrder(int: orderId): Boolean+ closeOrder(): Boolean OperationsVisibility Data Type Multiplicity Parameter List Return Type
  17. 17. Class Diagrams (associations) Order LineItemdateReceived itemIdisPrepaid * inStocktotalPrice 1 quantityshippingCharge color addItem()placeOrder() removeItem()closeOrder() setQuantity()
  18. 18. Class Diagrams (generalization) Order orderId price setPrice() DigitalOrder ShippedOrderfileType weightsetFileType() setWeight()
  19. 19. Class Diagrams (aggregation) Inventory Item quantity restockIDitemName restockDateitemType ShoppingCart cartID price setPrice()
  20. 20. Aggregation“Think of it as a modeling placebo” – Jim Rumbaugh
  21. 21. Class Diagrams (composition) Inventory Item quantity restockIDitemName restockDateitemType Order orderID price setPrice()
  22. 22. Sequence DiagramsShows how objects interact with each other
  23. 23. anOrder aLineItem aProduct aCustomercalculatePrice() calculatePrice() getPrice(quantity) getDiscount (anOrder) getBasePrice() discountedPrice
  24. 24. DiagramBehavior Diagram Structure DiagramActivity Use State Interaction Class Composite Structure Object Case Machine Timing Interaction Communication Sequence Package Deployment Component Overview
  25. 25. Interested in More?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×