Home > Back-end >  UML: is this sequence diagram true for a user authentication?
UML: is this sequence diagram true for a user authentication?

Time:01-23

i'm make a sequence diagram for the registration process to a website. The registration should include the following information:

  1. First name (required)
  2. Last name (required)
  3. Email (required)
  4. Password (required)
  5. Username (optional)
  6. phone number (optional) when submitting to register a verification email should be sent to the user's email.

This is the sequnce diagram I made:

enter image description here

is the sequnece correct? and do i need to make the the username and phone number messages in a alternative to indicate that they are optional or not?

CodePudding user response:

Basically your SD is almost correct. The fragments need to indicate the type in a tab top left which in this case would contain alt and also the constraint in square brackets to show the condition.

However, SDs are not meant for graphical programming. What you intend to show is better served in an activity diagram which focuses on business aspect (dialogs and their conditional order). An SD is useful to show complex communication between instances. Fragments should only be used sparse. The above would (in terms of implementation) better be shown in (abstract) code fragments, if ever. Any coder would prefer to look into an AD and go from there. Also think: cui bono? Who has use of it?

  • Related