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:
- user wants save
- app validates mandatory fields have values set
- if not valid, app shows message. if valid, app sends post request
- the controller maps dto domain model object , passes service layer
- service layer validates model according business rules. if not valid, throws validation exception
- if valid, model moves down data access layer, ef used commit changes db
- on trying commit, ef might throw validation exception (mapping) or database exception (bubbled db itself)
- if commit succeeds, model passed controller maps dto counterpart , displayed user
- if validation or database exception thrown, these displayed user
so far came with:
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.
- boundry class
- control class
- 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
Post a Comment