For MVC understanding

MVC pattern: According to my own understanding is to facilitate the management code.

M: model business logic layer  

service layer: used for logic processing, a method which calls dao obtained data.

 

dao layer: a database operation, the database call write tools connect to the database, manipulate the data.

 

 

V: view view layer

Front page

 

C: controller controlling layer   

 accept front servlet request sent, then the front end in response to the issue. Call service method to implement the logic. dao layer service call process obtained data in the database.

 

dao layer and which service is best to write an interface, with reference to the interface to call methods in the implementation class.

 

 

 

Guess you like

Origin www.cnblogs.com/yindong2019/p/11870322.html