Reputation: 986
tried researching this before asking but there is that many versions id like to get a definitive way to do an ASP.NET MVC UML Diagram, i attempted one below but i want to make sure im doing it correctly
also i see some articles state that the model updates the view and not the controller? im wondering is this true since i have my views using the Ienumerable model for displaying model data.
here is the mockup
Upvotes: 2
Views: 2273
Reputation: 36313
I would use a general class <<controller>>
from which the controllers inherit get/set. Probably a generic class would be nice to construct the id based on the class name. You should further stereotype your M and V classes accordingly.
Your design lacks any association between M, V and C. You should associate V -> C -> M (directed association). Means: a view has a controller. A controller has a model.
Just notice that you use plural for V classes. Better use singular. There my be many instances but only one class.
Re your question about model updating a view: e.g. Ruby has scaffolding which bypassed the controller in some cases so the model directly punches through to the view.
Upvotes: 5