SlideShare uma empresa Scribd logo
1 de 29
UML and You:
Communicating with your community

           David Haskins
Quick Side Note: “The” UML

I refuse to refer to it as “the” UML. I will simply
refer to the topic as “UML.”
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.”
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.
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)
Why use UML?

I suggest you use it as a sketch.
Most Common UML Diagrams
• Use Case Diagrams
• Class Diagrams
• Sequence Diagrams
Diagram



Behavior Diagram                             Structure Diagram


Activity   Use    State   Interaction        Class Composite Structure    Object
           Case   Machine




 Timing Interaction Communication Sequence   Package   Deployment Component
         Overview
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 to checkout
  3. Customer fills in shipping information
  4. ….
  10. System sends confirmation e-mail to customer
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.
Use Case Diagram (example)
                         Browse Catalog

                         Checkout              Records Transaction

                         Enter Shipping Info

Customer                Calls Customer                           Accounting

System




           Supervisor
Classes vs Objects


What’s the difference between

                      a Class and an Object?
Class Diagrams
    Order
dateReceived
isPrepaid
totalPrice
shippingCharge
items
placeOrder()
closeOrder()
Class Diagrams
            Order
+ dateReceived: Date[1]
- isPrepaid: Boolean [0..1]
+ totalPrice: Float[1]
# shippingCharge: Float [1]
+ items: LineItem [*]
+ placeOrder(int: orderId): Boolean
+ closeOrder(): Boolean
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                                          Operations
Visibility
             Data Type
                            Multiplicity
                                  Parameter List
                                                   Return Type
Class Diagrams (associations)
    Order                 LineItem
dateReceived          itemId
isPrepaid           * inStock
totalPrice     1       quantity
shippingCharge         color
                      addItem()
placeOrder()          removeItem()
closeOrder()          setQuantity()
Class Diagrams (generalization)
                         Order
                  orderId
                  price
                  setPrice()



   DigitalOrder                     ShippedOrder
fileType                         weight
setFileType()                    setWeight()
Class Diagrams (aggregation)
                         Inventory
   Item              quantity
                     restockID
itemName             restockDate
itemType
                        ShoppingCart
                     cartID
                     price
                     setPrice()
Aggregation
“Think of it as a modeling placebo”
  – Jim Rumbaugh
Class Diagrams (composition)
                        Inventory
   Item             quantity
                    restockID
itemName            restockDate
itemType
                          Order
                    orderID
                    price
                    setPrice()
Sequence Diagrams
Shows how objects interact with each other
anOrder                      aLineItem                           aProduct   aCustomer



calculatePrice()
                        calculatePrice()

                                                         getPrice(quantity)




                                                       getDiscount (anOrder)



                                                          getBasePrice()




                                                             discountedPrice
Diagram



Behavior Diagram                             Structure Diagram


Activity   Use    State   Interaction        Class Composite Structure    Object
           Case   Machine




 Timing Interaction Communication Sequence   Package   Deployment Component
         Overview
Interested in More?

Mais conteúdo relacionado

Semelhante a UML and You

Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)
Paulo Gandra de Sousa
 
Data Access Tech Ed India
Data Access   Tech Ed IndiaData Access   Tech Ed India
Data Access Tech Ed India
rsnarayanan
 
SPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentialsSPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentials
Mark Rackley
 

Semelhante a UML and You (20)

Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)
 
Ooad sequence diagram lecture
Ooad sequence diagram lectureOoad sequence diagram lecture
Ooad sequence diagram lecture
 
Data Access Tech Ed India
Data Access   Tech Ed IndiaData Access   Tech Ed India
Data Access Tech Ed India
 
Software System Architecture-Lecture 6.pptx
Software System Architecture-Lecture 6.pptxSoftware System Architecture-Lecture 6.pptx
Software System Architecture-Lecture 6.pptx
 
Greenfield Development with CQRS and Windows Azure
Greenfield Development with CQRS and Windows AzureGreenfield Development with CQRS and Windows Azure
Greenfield Development with CQRS and Windows Azure
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side Javascript
 
C# p9
C# p9C# p9
C# p9
 
Kotlin and Domain-Driven Design: A perfect match - Kotlin Meetup Munich
Kotlin and Domain-Driven Design: A perfect match - Kotlin Meetup MunichKotlin and Domain-Driven Design: A perfect match - Kotlin Meetup Munich
Kotlin and Domain-Driven Design: A perfect match - Kotlin Meetup Munich
 
Intro to GraphQL on Android with Apollo DroidconNYC 2017
Intro to GraphQL on Android with Apollo DroidconNYC 2017Intro to GraphQL on Android with Apollo DroidconNYC 2017
Intro to GraphQL on Android with Apollo DroidconNYC 2017
 
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
 
Onlin shopping
Onlin shoppingOnlin shopping
Onlin shopping
 
Hibernate training
Hibernate trainingHibernate training
Hibernate training
 
Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)
 
Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-
 
NoSQL, no Limits, lots of Fun!
NoSQL, no Limits, lots of Fun!NoSQL, no Limits, lots of Fun!
NoSQL, no Limits, lots of Fun!
 
SPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentialsSPTechCon - Share point and jquery essentials
SPTechCon - Share point and jquery essentials
 
The D3 Toolbox
The D3 ToolboxThe D3 Toolbox
The D3 Toolbox
 
Collections
CollectionsCollections
Collections
 
.NET Database Toolkit
.NET Database Toolkit.NET Database Toolkit
.NET Database Toolkit
 
Scala collections api expressivity and brevity upgrade from java
Scala collections api  expressivity and brevity upgrade from javaScala collections api  expressivity and brevity upgrade from java
Scala collections api expressivity and brevity upgrade from java
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

UML and You

  • 1. UML and You: Communicating with your community David Haskins
  • 2.
  • 3. Quick Side Note: “The” UML I refuse to refer to it as “the” UML. I will simply refer to the topic as “UML.”
  • 4. 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.”
  • 5. 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.
  • 6.
  • 7. 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)
  • 8. Why use UML? I suggest you use it as a sketch.
  • 9. Most Common UML Diagrams • Use Case Diagrams • Class Diagrams • Sequence Diagrams
  • 10. Diagram Behavior Diagram Structure Diagram Activity Use State Interaction Class Composite Structure Object Case Machine Timing Interaction Communication Sequence Package Deployment Component Overview
  • 11.
  • 12. Use Case Diagram • Very similar to “user stories” in XP, but generally more detailed. • Includes alternatives to success.
  • 13. 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
  • 14. 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.
  • 15. Use Case Diagram (example) Browse Catalog Checkout Records Transaction Enter Shipping Info Customer Calls Customer Accounting System Supervisor
  • 16. Classes vs Objects What’s the difference between a Class and an Object?
  • 17. Class Diagrams Order dateReceived isPrepaid totalPrice shippingCharge items placeOrder() closeOrder()
  • 18. Class Diagrams Order + dateReceived: Date[1] - isPrepaid: Boolean [0..1] + totalPrice: Float[1] # shippingCharge: Float [1] + items: LineItem [*] + placeOrder(int: orderId): Boolean + closeOrder(): Boolean
  • 19. 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 Operations Visibility Data Type Multiplicity Parameter List Return Type
  • 20. Class Diagrams (associations) Order LineItem dateReceived itemId isPrepaid * inStock totalPrice 1 quantity shippingCharge color addItem() placeOrder() removeItem() closeOrder() setQuantity()
  • 21. Class Diagrams (generalization) Order orderId price setPrice() DigitalOrder ShippedOrder fileType weight setFileType() setWeight()
  • 22. Class Diagrams (aggregation) Inventory Item quantity restockID itemName restockDate itemType ShoppingCart cartID price setPrice()
  • 23. Aggregation “Think of it as a modeling placebo” – Jim Rumbaugh
  • 24. Class Diagrams (composition) Inventory Item quantity restockID itemName restockDate itemType Order orderID price setPrice()
  • 25. Sequence Diagrams Shows how objects interact with each other
  • 26. anOrder aLineItem aProduct aCustomer calculatePrice() calculatePrice() getPrice(quantity) getDiscount (anOrder) getBasePrice() discountedPrice
  • 27. Diagram Behavior Diagram Structure Diagram Activity Use State Interaction Class Composite Structure Object Case Machine Timing Interaction Communication Sequence Package Deployment Component Overview
  • 28.