I've have to work on a new project,written in C# mvc,the first thing i would like to do is create an UML class diagram. Is there somewhere an example of how to do this? Most examples show one controller with one view and one model. But in this project there is per controller multiple Views and multiple ModelDto's Thanks.
MVC Pattern stands for Model-View-Controller Pattern. This pattern is used to separate application's concerns. Model - Model represents an object or JAVA POJO carrying data. It can also have logic to update controller if its data changes. View - View represents the visualization of the data that model contains.
The Model View Controller (MVC) design pattern specifies that an application consist of a data model, presentation information, and control information. The pattern requires that each of these be separated into different objects. MVC is more of an architectural pattern, but not for complete application.
What are the Class Diagrams? Class diagrams are the main building block in object-oriented modeling. They are used to show the different objects in a system, their attributes, their operations, and the relationships among them.
A class diagram is a UML diagram type that describes a system by visualizing the different types of objects within a system and the kinds of static relationships that exist among them. It also illustrates the operations and attributes of the classes.
You can do like below by using MS visio or any other UML tool.
Just a sample looks like below (methods and properties should differ)
Like above you can extend the above diagram for more views and models per controller.
i.e. In MVC you can have many Action methods inside a Controller and relevant view and model per Action method (in general).
For more details check Model View Controller Design Patterns
I hope this will help to you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With