Sequence diagrams are one of the most popular UML diagrams
explaining the dynamic behavior of the software. A Sequence diagram explains
the object life cycle from its creation to its termination with respect to
other objects. The two important parts of a sequence diagram are lifeline and
messages. A lifeline shows the scope of the object. It represents the lifeline
of the object showing the scope of the object from creation to termination. A
message generally represents a method of an object or an operation of the
object. In sequence diagrams we can even show the self methods of an object.
Figure 1 shows an object "SomeObject" with a message "Some
Message." The vertical rectangle shown defines the scope of the object. It
should be noted that the scope of the object shown is always relative to another
object.
Figure 1
Let us take a meaningful example to understand a sequence
diagram. Let us explain a simple log-in page authentication. For simplicity,
let us omit the database provider and limit our self with the authentication
provider. Figure 2 shows the object LogIn.aspx page with user name and password
given by the user and clicks on the button Log-In. After this the Authenticate
Credentials method gets called for the object AuthenticationProvider.
Figure 2