1

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:

enter image description here

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
Maermot
  • 245
  • 1
  • 3
  • 8

1 Answers1

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).
qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • Thanks a lot for your detailed answer @ThomasKilian ! I have a question to point 3: So can i use a method from the Client to the Controller, which includes the data as parameters (or is it always the HTTP request/response), for example if i want to send data in an html form element from the Client to the Controller? or should i just use the HTTP Request, from Client to Controller, and the parameter are shown afterwards, if the Controller uses a method or something...? – Maermot Sep 20 '15 at 19:41
  • Would you mind to ask that as separate question and tick this one as correct? I'll have a look then tomorrow morning (it's bed-time here). – qwerty_so Sep 20 '15 at 21:24