Sequence Diagram for Login MVC Webapp

泪湿孤枕 提交于 2020-01-05 09:29:08

问题


i want to make a sequence diagram, which shows the login process in an .Net MVC Webapp (i.e. webshop). I am quite new to UML modeling, so i am not sure, how to build the interaction between, Controller, model and view. I found different solution online. Here are some question i have:

  1. Does the client interact with the view, or directly with the Controller (in my test Trial the client interacts with the Controller)?
  2. For the loginvalidation: In my test Trial the Controller ask the model, if the login_data (username and pw) are correct. Is it necessary, that the model interacts with an database, where the user data are stored?
  3. If i would like to send data in an http Request, should i just add the variable in the brackets?

Here is my test Trial:


回答1:


This is perfect. You just could shortcut the http-response and move it outside the alt fragment.

  1. The controller is the one to "do the job" and the view just to present it. Actually there's a bit of intermix since views contain some basic I/O logic. But here the http-data travel from the client to the controller.
  2. It depends. You "can" show that but you "must not". If the model reader needs to know the details you can show that directly or in a separate SD.
  3. You would usually pass data as parameter of a method. You can also show concrete data (e.g. a quoted string or an integer value).


来源:https://stackoverflow.com/questions/32680560/sequence-diagram-for-login-mvc-webapp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!