How to represent the MVC classes in the UML?

8

How to represent the mvc model classes in the UML? A colleague told me that he just puts Control in his modeling.

Is this correct? Another question would be if I need to put the connection class with the bank.

    
asked by anonymous 27.11.2016 / 00:00

1 answer

12

Rosberg, I made a very rough representation of how I could represent in UML, in the image below. Regarding the connection class to the bank, the most appropriate would be to use a design pattern, in this case the Data Access Object (DAO).

One thing I even forgot to insert into my diagram was the relationship between classes within packages. In UML I have stereotypes to represent control class and interface, it looks much more visual, I think it's cool to use. If the control class accesses the model I do not see the need to establish a relationship between the model and the interface again, then it does the following the view calls the control and the control calls the model, this way it is very interesting its diagram. Actually the factory would be cool if you were to establish connection between more than one type of database, as an example a postgres, mysql and oracle, so I would make a connection factory. Since DAO is great for data access then I highly recommend using Dao.

    
27.11.2016 / 01:26