More on UML Use Case Diagrams
Find out what components are in a use case diagram (actors, extensions, sterotypes and notes), how to depict different interactions and features for which people use the application and how to map these features into a use case diagram. As you read this
section, keep in mind that use case diagram cares about WHAT, not HOW.
Objectives
- Learn how to map application features to use case diagrams
- Learn what components are in a use case diagram
What are UML Diagrams?
UML stands for Unied Modeling Language. UML helps developers visualize the the system's architecture, understand high level components and application features
Dierent Types of UML Diagrams
- Use case diagrams - documents how a user may use your application
- Component diagrams - documents the components of larger elements and how they interact with each other
- Activity diagrams - documents the ow of the application; ie. implementation details
- Sequence diagrams - documents the steps your application
- Class diagrams - documents the blueprint of your classes
- State diagrams - documents change of state of a component
- Object diagrams - documents the objects in relation to other objects
- Deployment diagrams - documents the operations and deployments of the software
- Timing diagrams - documents the time certain events happen in dierent components
What will we focus on?
- Use case diagrams
- Sequence diagrams
- Class diagrams
Use Case Diagrams
Use case diagrams help depict different use cases and interactions for which people use an application.
Use Case Diagram components
- Actors - users of the application
- Extensions - relationship between an actor and another actor or use case
- Stereotypes - categorizing your users
- Notes - additional information for the relationship and interactions
Tools for Diagramming
Languages that generate diagrams
- PlantUML
- yUML
- Mermaid
Visual Tools
- Microsoft Visio
- Lucidchart
- Google Draw
PlantUML: A UML Tool
- Is a diagramming language that generates visualizations
- Can easily be version controlled
UML Example: E-commerce Diagrams
UML Example: E-commerce Diagram PlantUML Code
@startumlleft to right direction
actor customer
rectangle purchasing_an_item {
customer --> (add_item_to_cart)
(add_item_to_cart) --> (checkout)
(checkout) --> (enter_address)
(enter_address) --> (add_billing_info)
(add_billing_info) --> (confirm_order)
}
newpage
left to right direction
actor fulfillment_staff
rectangle shipping_an_item {
fulfillment_staff --> (receive_order)
(receive_order) --> (locate_item)
(locate_item) --> (package_with_shipping_label) (package_with_shipping_label) --> (ship)
}
@enduml
Summary
- Use case diagrams are used to visualize and document the application features from a high level
- Plant UML is a modeling language that allows you to version your visualizations