问题
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:
- Does the client interact with the view, or directly with the Controller (in my test Trial the client interacts with the Controller)?
- 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?
- 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.
- 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.
- 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.
- 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