Vous êtes sur la page 1sur 7

28/10/13 UML Sequence Diagram Examples

Sequence Diagrams Examples


Here we provide some examples of UML sequence diagrams:

Online bookshop UML sequence diagram

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.

Submit comments to Pluck using DWR, AJAX, JSON

Purpose: An example of UML sequence diagram which shows how user comments on some article are submitted to Pluck using
various AJAX technologies.

Summary: Comments submitted by a web user are first validated by the web site which is hosting commented article. DWR
technology (AJAX for Java) is used to convert user comments HTML form data into Java object and possible validation errors - back
into JavaScript callbacks for errors. Comments that look Ok are submitted to Pluck server hosting all comments to all articles.

Facebook user authentication in a web application

Purpose: An example of sequence diagram which shows how Facebook user could be authenticated in a web application to allow
access to his/her Facebook resources.

Summary: Facebook uses OAuth 2.0 protocol framework which enables web application (called "client"), which is usually not the
Facebook resource owner but is acting on the Facebook user's behalf, to request access to resources controlled by the FB user and
hosted by the Facebook server. Instead of using the Facebook user credentials to access protected resources, the web application
obtains an access token.

Spring and Hibernate transaction management

Purpose: An example of UML sequence diagram which illustrates transaction management combined with exception handling using
Spring framework for enterprise Java and Hibernate.

Summary: Spring application development framework for enterprise Java integrates Hibernate transaction management. Business
method execution could complete (successfully or not) without throwing any exception, or by throwing some Java runtime
(unchecked) exception or some business (checked) exception. Transaction interceptor will will decide to try to commit transaction or to
roll it back.

Online Bookshop
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.

www.uml-diagrams.org/sequence-diagrams-examples.html 1/7
28/10/13 UML Sequence Diagram Examples

An example of sequence diagram for Online Bookshop.

Submit Comments to Pluck


An example of sequence diagram which shows how user comments on some article are submitted to Pluck using various AJAX technologies.
(See example of interaction overview diagram with similar semantics at Submit Comments to Pluck using DWR, AJAX, JSON.)

Comments submitted by user are first validated by the web site hosting articles. DWR technology (AJAX for Java) is used to convert user
comments HTML form data into Java object and possible validation errors - back into JavaScript callbacks for errors.

Comments that look Ok are submitted to Pluck server hosting all comments to all articles. AJAX technology is also used in this case both to
submit the new comment as well as to get back the list of all recent comments (including the new one). JSON is used to get comments back.

This diagram also shows some duration constraints. (Disclaimer: constraints shown are fictitious and not describing any real communication.)
For example, according to the diagram callback waiting time for posted comment varies from 1 to 4 seconds. At the same time, requesting all
posted comments takes only up to 100 msec.

www.uml-diagrams.org/sequence-diagrams-examples.html 2/7
28/10/13 UML Sequence Diagram Examples

Sequence diagram example - submit comments to Pluck using DWR, AJAX, JSON.

Facebook User Authentication in a Web


Application
An example of sequence diagram which shows how Facebook (FB) user could be authenticated in a web application to allow access to his/her
FB resources. Facebook uses OAuth 2.0 protocol framework which enables web application (called "client"), which is usually not the FB resource
owner but is acting on the FB user's behalf, to request access to resources controlled by the FB user and hosted by the FB server. Instead of using
the FB user credentials to access protected resources, the web application obtains an access token.

Web application should be registered by Facebook to have an application ID (client_id) and secret (client_secret). When request to some
protected Facebook resources is received, web browser ("user agent") is redirected to Facebook's authorization server with application ID and
the URL the user should be redirected back to after the authorization process.

User receives back Request for Permission form. If the user authorizes the application to get his/her data, Facebook authorization server
redirects back to the URI that was specified before together with authorization code ("verification string"). The authorization code can be
exchanged by web application for an OAuth access token.

www.uml-diagrams.org/sequence-diagrams-examples.html 3/7
28/10/13 UML Sequence Diagram Examples

Sequence diagram example - Facebook User Authentication in a Web Application.

If web application obtains the access token for a FB user, it can perform authorized requests on behalf of that FB user by including the access
token in the Facebook Graph API requests. If the user did not authorize web application, Facebook issues redirect request to the URI specified
before, and adds the error_reason parameter to notify the web application that authorization request was denied.

Spring and Hibernate transaction management

Noticed some spelling error? Select the text using the mouse and press Ctrl + Enter.

22 Comments
ALSO ON UML DIAGRAMS WHA T ' S T HI S ?

UML Information Flow Diagrams - Overview of Graphical An example of UML composite structure diagram for a bank
Notation 1 comment ATM (Automated Teller Machine). 1 comment

Java 6 thread states and life cycle UML protocol state Software Protection and Licensing UML use case diagrams
machine diagram example. 3 comments example for Sentinel License Development Kit. 1 comment

Website management or administration UML use case UML use case diagram example for Hospital Management.
diagrams example. 3 comments 1 comment

www.uml-diagrams.org/sequence-diagrams-examples.html 4/7
28/10/13 UML Sequence Diagram Examples

Online ShoppingUML Use Case Diagram Example 2 comments How to Draw UML Use Case Diagram - Determine Subject
Boundaries, Define Actors, Describe Use Cases. 1 comment

22 comments 20

Leave a message...

Newest Community Share

Avatar No1Lik es TheTrut h a month ago

this article shows an example of the conceptual logic, terminology and objects needed to create a diagram - surely the freeloaders can figure out
how to design a diagram instead of leeching off this site for solutions, if not, then they you do not deserve to be in IT!
Reply Share

Avatar pay al a month ago

can u have the class diagrams for E-NEWS MANAGEMENT SY STEM so plz show me on this site.
Reply Share

Avatar Gangabhahirat hi 10 months ago

NICE DIAGRAM:)
Reply Share

Avatar ena a year ago

thnx.. nice one :)


1 Reply Share

Avatar Jay a year ago

thx
1 Reply Share

Avatar foram s at hwara a year ago

plz i want to Sequence diagram for fashion design ma nagement.plzzz put on this website
2 Reply Share

Malay foram sathwara 11 months ago


what?
Reply Share

Avatar jay ant bramhank ar a year ago

Great, Thank you sir.


1 Reply Share

Avatar A riana43 2 years ago

thanks a lot..
2 Reply Share

S wapnak anc ha5 Ariana43 a year ago


can any one send online shopping class diagram on books..........

1 Reply Share

Avatar Fak eac c ont 2 years ago

plzzz put sequence n activity diagram for online shopinggggggggg...plzzzzzzz


4 2 Reply Share

A ns h Chaudhari Fakeaccont 2 years ago


hey i m ansh..and also i hv needed dis 2 diagram...
www.uml-diagrams.org/sequence-diagrams-examples.html 5/7
28/10/13 UML Sequence Diagram Examples
@diagram
1 Reply Share

Avatar Homes for s ale in A jax 2 years ago

HI,

friends, I am very impressed from this article. It article is providing very useful information in regarding to Ajax.
1 Reply Share

Avatar A vnik apat el 2 years ago

plz...put the uml diagrams for railway management system


1 Reply Share

Avatar Jmupenz i 2 years ago

good
1 Reply Share

Avatar rahul bhagia 2 years ago

gud one sir


1 Reply Share

Avatar Is aac nia 2 years ago

very very very goooooooooooooooooooood


1 Reply Share

Avatar K eer3s iva 2 years ago

how to draw class diagram for active city adminstration project


1 1 Reply Share

Avatar iP ad A pplic at ion Developers 2 years ago

Well define Uml diagram, nice article.


4 Reply Share

Avatar t erm paper writ ing s ervic e 2 years ago

This
information is very good for me . Very spacial thanks to Author of this
article
2 Reply Share

Avatar May at as s y 2 years ago

waooo awesome
Reply Share

Avatar Nis ha S weet u17 3 years ago

how to draw the sequenced diagram for online web site?


6 2 Reply Share

Su b s cri b e Ad d D i s q u s to yo u r s i te

uml-diagrams.org 3
Suka 606
by Kirill Fakhroutdinov

This document describes UML 2.5 and is based on OMG Unified Modeling Language (OMG UML) 2.5 specification [UML 2.5
Specification].
All UML diagrams were created in Microsoft Visio 2007, 2010 using UML 2.2 stencils. Y ou can send your comments and suggestions to web master

www.uml-diagrams.org/sequence-diagrams-examples.html 6/7
28/10/13 UML Sequence Diagram Examples
at webmaster@uml-diagrams.org.

Copyright 2010-2013 uml-diagrams.org. All rights reserved.

www.uml-diagrams.org/sequence-diagrams-examples.html 7/7

Vous aimerez peut-être aussi