UML Diagram Examples
Here we provide several UML diagrams of different types, all part of a simple fabricated Online Shopping model:
Purpose: Provide top level use cases for a web customer making purchases online.
Purpose: Define major use cases for a credit card processing system (credit card payment gateway).
Summary: The merchant submits a credit card transaction request to the credit card payment gateway on behalf of a customer. Bank which issued customer's credit card is actor which could approve or reject the transaction. If transaction is approved, funds will be transferred to merchant's bank account.
Purpose: Website management or administration UML use case diagrams example.
Summary: Website Administrator actor could manage user groups, users, user sessions, and logs. Help Desk staff uses a subset of functions available to the Website Administrator.
Purpose: Show some domain model for online shopping - Customer, Account, Shopping Cart, Product, Order, Payment.
Summary: Example of a UML class diagram representing online shopping domain. Each customer could have some web user identity. Web user could be in one of several states and could be linked to a shopping cart.
Summary: Every company having customers maintains customer accounts and supports a complete life cycle of the account from its creation until it is closed. There are differences in what are the stages (states) in the account's life cycle, and what are conditions or events causing account to change its state.
Purpose: An example of high level UML sequence diagram for Online Bookshop.
Summary: Online customer can search book catalog, view description of a selected book, add book to shopping cart, do checkout.
Purpose: An example of UML communication diagram for Online Bookshop.
Summary: Web customer actor can search inventory, view and buy books online.
Purpose: An example of activity diagram for online shopping.
Summary: Online customer can browse or search items, view specific item, add it to shopping cart, view and update shopping cart, checkout. User can view shopping cart at any time. Checkout includes user registration and login.
Purpose: An example of interaction overview diagram for online shopping.
Summary: Customer may search or browse items, add or remove items from shopping cart, do checkout.
Purpose: An example of UML object diagram which shows some runtime objects involved into login process for a web user.
Summary: An instance of Login Controller class is associated with instances of User Manager, Cookie Manager, and Logger. Login Controller, User Manager, and Hibernate User DAO (Data Access Object) share a single instance of Logger.
Purpose: An example of a component diagram for online shopping.
Summary: The diagram shows "white-box" view of the internal structure of three related subsystems - WebStore, Warehouses, and Accounting. WebStore subsystem contains three components related to online shopping - Search Engine, Shopping Cart, and Authentication. Accounting subsystem provides two interfaces - Manage Orders and Manage Customers. Warehouses subsystem provides two interfaces Search Inventory and Manage Inventory used by other subsystems.
Purpose: An example of UML deployment diagram for a web application.
Summary: Book club web application artifact book_club_app.war is deployed on Catalina Servlet 2.4 / JSP 2.0 Container which is part of Apache Tomcat 5.5 web server.
Purpose: UML provides no special kind of diagram to describe logical or physical network architecture of the designed or existing system. Deployment diagrams could be used for this purpose with elements limited mostly to devices with neither artifacts nor actual deployments shown.
Summary: This example of the network diagram shows network architecture with configuration usually called "two firewall demilitarized zone (DMZ)". DMZ is a host or network segment located in a "neutral zone" between the Internet and an organization’s intranet (private network). It prevents outside users from gaining direct access to an organization’s internal network while not exposing a web, email or DNS server directly to the Internet.
An example of high level sequence diagram for Online Bookshop. Online customer can search book catalog, view description of a selected book, add book to shopping cart, do checkout.
An example of sequence diagram for Online Bookshop.
Online Shopping Activity Diagram
An example of activity diagram for online shopping. Online customer can browse or search items, view specific item, add it to shopping cart, view and update shopping cart, checkout. User can view shopping cart at any time. Checkout is assumed to include user registration and login.
This example is not using partitions, most of the actions are assumed to be fulfilled by online customer.
An example of UML activity diagram for online shopping.
Interaction Overview Diagram
An example of interaction overview diagram for online shopping. Customer may search or browse items, add or remove items from shopping cart, do checkout.
An example of interaction overview diagram for online shopping.
This interaction overview diagram is enclosed by sd frame (abbreviated form for all kinds of interaction diagrams). All non-control nodes of the diagram are references to interactions - interaction uses.
Web Application Manifestation
This is an example of UML deployment diagram which shows manifestation of components by artifacts and internal structure of artifacts. I would call this kind of deployment diagrams manifestation diagrams or implementation diagrams as they actually do not show any deployments.
Example of manifestation diagram for web application.
Web application archive artifact book_club_app.war contains several files, folders and subfolders. Stereotypes «file» and «library» are standard UML stereotypes applicable to artifacts. This diagram also shows non-standard stereotype «folder» which is rendered as package.
Several components are shown on the diagram manifested (implemented) by jar archive files.
An example of web application UML deployment diagram. Book club web application artifact book_club_app.war is deployed on Catalina Servlet 2.4 / JSP 2.0 Container which is part of Apache Tomcat 5.5 web server.
An example of deployment diagram for web application.