Diagrama de Secuencia en UML - StarUML

Diagrama de Secuencia en UML - StarUML

Introduction

The speaker introduces themselves and discusses the practical use of sequence diagrams in moderating interactions within a system.

Practical Use of Sequence Diagrams

  • Sequence diagrams are useful for visualizing how objects interact with each other and the order in which these interactions occur.
  • They represent interactions for a specific scenario or situation, with processes shown vertically and interactions shown with arrows.
  • Various software and platforms can be used to create sequence diagrams, such as Dia, Visual Paradigm, or StarUML.

Creating a Sequence Diagram

The speaker explains how to create a sequence diagram using the StartUML program.

Creating an Interface

  • Open StartUML and create an interface for the application.
  • Select "Model" from the top left corner, then "Sequence Diagram."
  • A rectangle representing the application will appear on the diagram.

Actors in the Application

  • Identify the actors involved in the application's functioning.
  • In this case, there are three actors: User, Application, and Servers.
  • Represent these actors using stick figures or icons.

Adding Interactions

  • Interactions in a sequence diagram occur from left to right.
  • Messages are represented by arrows pointing right for outgoing messages and left for incoming messages.
  • Most services require user registration. Represent this by adding a return message arrow from Application to User labeled "Request Account."

Verifying User Existence

  • To verify if a user exists, add an outgoing message arrow from Application to Servers labeled "Check Account Existence."
  • At this point, a conditional branch occurs based on whether the user exists or not.

Conditional Branching

  • Add a combined fragment box (conditional box) after the "Check Account Existence" message.
  • Within this box, specify two conditions: "User Exists" and "User Does Not Exist."

Conditional Branching and Account Creation

The speaker continues explaining the conditional branching in the sequence diagram.

User Existence Check

  • If the user exists, the server informs the application that access is granted.
  • Represent this by adding a return message arrow from Servers to Application labeled "Access Granted."

User Does Not Exist

  • If the user does not exist, the server prompts the application to allow account creation.
  • Add a return message arrow from Servers to Application labeled "Prompt Account Creation."

Prompting Account Creation

  • To represent prompting for account creation, add an outgoing message arrow from Application to User labeled "Create Account."
  • This completes the sequence diagram for this scenario.

The transcript continues beyond this point, but these are the key points covered in this section.

User Existence Notification

This section discusses the notification process when a user exists on the server.

User Existence Notification

  • When a user exists, the server notifies the application.
  • A notification message is sent from the server to the application indicating that the user or account exists.

Requesting User Password

This section covers the process of requesting a password from the user.

Requesting User Password

  • After confirming user existence, the server requests the user's password to proceed.
  • The server sends a message to inform the application about this request.
  • The application then sends a message to prompt the user for their password.

Continuing Sequence and Verifying Password

This section explains how the sequence continues and verifies the entered password.

Continuing Sequence and Verifying Password

  • The sequence continues with the user sending their entered password back to the application through a message.
  • The application verifies this password with the server using a verification message.

Successful Verification and Access Granting

This section describes what happens when verification is successful and access is granted.

Successful Verification and Access Granting

  • If verification is successful, a message indicating success is sent from the server to the application.
  • The server enables user access and sends another message to the application to inform about this access grant.

User Does Not Exist

This section discusses the scenario when a user does not exist.

User Does Not Exist

  • If the user does not exist, the server notifies the application of a login error through a message.
  • The application then prompts the user to create an account using a message.

Sending Account Data and Account Creation

This section covers sending account data and creating an account.

Sending Account Data and Account Creation

  • The user sends their account data through a message.
  • The application forwards this information to the server using a message.
  • Upon successful verification on the server, it notifies the application that the account is ready, allowing access for the user.

Conclusion of Conditional Flow

This section concludes the conditional flow of events.

Conclusion of Conditional Flow

  • At this point, with either existing or new accounts, further interactions between server and application occur based on specific functionalities.
  • The server sends music data to be displayed by the application through messages.

This summary provides an overview of how users are notified of their existence, password request process, verification steps, granting access, handling non-existing users, sending account data for creation, and the conclusion of the conditional flow.

Video description

¡Hola! He subido este video para que puedas aprender como hacer un diagrama de secuencia en UML. ¡Gracias por ver😊! 💻 Sigueme en twitter: https://twitter.com/moniqueCodes ☕️ Invitame a un café: https://ko-fi.com/codingconmonique