entity framework - UML sequence for validation before saving -


i'm new uml i'm tasked draw uml diagrams describe complex parts of our system.

one of these parts saving of data in db, , steps said data goes through before can saved.

these steps involved:

  1. user wants save
  2. app validates mandatory fields have values set
  3. if not valid, app shows message. if valid, app sends post request
  4. the controller maps dto domain model object , passes service layer
  5. service layer validates model according business rules. if not valid, throws validation exception
  6. if valid, model moves down data access layer, ef used commit changes db
  7. on trying commit, ef might throw validation exception (mapping) or database exception (bubbled db itself)
  8. if commit succeeds, model passed controller maps dto counterpart , displayed user
  9. if validation or database exception thrown, these displayed user

so far came with:

sequence diagram

is enough display above steps or might there improvements diagram?

in sequence diagrams show interaction between classes or objects. before drawing sequence diagram need identify classes , methods(behaviours). in sequence diagrams there 3 type of classes.

  1. boundry class
  2. control class
  3. entity class

boundry classes represents views of system(user interfaces). entity classes show table of database(entities) control classes stay between boundry classes , entity classes.and passes messages among them.

  • in diagram think database should not class name. can't define in sequence diagram.(you can define related class particular table)
  • you need specify data passing other classes through method. example:

    save(user_name,age)

  • you can display user actor rather displaying class.

  • current diagram doesn't show conditions of system(if else condition).you can use "alt" show conditions.

  • when passing messages between classes method name should have been defined in receiving class.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -