Module 2 - UML for Web Applications
Module 2 - UML for Web Applications
User interactions are crucial in web applications, and UML provides various diagrams to
represent them effectively.
Use case diagrams depict the interactions between users (actors) and the system. They help
in identifying system functionalities and user roles.
• Actors: Represent external entities (users or other systems) interacting with the
system.
Sequence diagrams describe the step-by-step flow of interactions between users and the
system components over time.
Actor Action
4. Payment is processed.
6. Order is shipped.
(Start) --> [Select Product] --> [Add to Cart] --> [Proceed to Checkout]
--> [Process Payment] --> [Confirm Order] --> [Ship Order] --> (End)
Behavioral diagrams in UML illustrate the internal logic and operations of the system.
State machine diagrams define the different states an object goes through during its lifecycle
and the transitions between those states.
• Microsoft Visio
• Lucidchart
• draw.io (diagrams.net)
• Enterprise Architect
• StarUML
Best Practices for UML in Web Applications
Scenario
A university library wants to develop a web-based Library Management System (LMS) that
allows students to search for books, borrow books, and return books. The librarian should
be able to manage books and members.
1. Use Case Diagram: Defines actors (Students, Librarian) and their interactions with
the system.
2. Sequence Diagram: Illustrates the book borrowing process from search to checkout.
Practical Exercise
1. Draw a Use Case Diagram for the LMS system based on the above scenario.
• State Machine and Collaboration Diagrams help in defining internal system logic.