Understanding of MVC, MVT's?

MVC design pattern

MVC design pattern Core: decoupling, so reducing the coupling between the different blocks of code, the code may be extended and enhanced portability, backward compatibility.
Herein described functions of each part with a picture of the MVC
M spelling as Model, the main package access to the database layer, the data in the database to add, delete, change, search operation.
V spelling of View, for enclosing a result, content generated html page display.
C is a spelling Controller, for receiving a request, the business logic process, and to interact with Model View, return results.
Here Insert Picture Description

MVT Design Patterns

In Django MVT design framework that follows the MVC design pattern -Django.
With pictures here describe the function of each part of MVT:
Here Insert Picture Description
M spelling for the Model, the same as the M functions in MVC is responsible for interacting with the database, data processing.
V spelling of View, and C functions in the same MVC, receives the request, performs service processing and returns a response.
Template T is spelling, and V in MVC same function, responsible html package structure to be returned.

Released nine original articles · won praise 1 · views 452

Guess you like

Origin blog.csdn.net/qq_45785397/article/details/104180550