How to represent the MVC classes in UML?

Asked

Viewed 2,886 times

8

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

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

1 answer

12


Rosberg, I made a very rough representation of how I could represent in UML, follows in the image below. Regarding the connection class to the database, the most indicated would be to use a project standard, in this case the DAO (Data Access Object). inserir a descrição da imagem aqui

One thing I even forgot to insert into my diagram was the relationship between the classes within the packets. In UML I have stereotypes to represent class of control and interface, it is much more visual, I think cool you 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 does the following view calls the control and the control calls the model, so it gets very interesting its diagram. Actually Factory would be nice if you were to establish connection between more than one type of database, such as a postgres, mysql and oracle, so I would make a connection factory. DAO is great for data access so I highly recommend you use Dao.

  • Thank you, you helped so much! Thanks!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.