Model View Template Design Pattern, Essays (high school) of English

Model View Template or MVT pattern

Typology: Essays (high school)

2020/2021

Uploaded on 01/13/2022

afia-tasnim
afia-tasnim 🇧🇩

4 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Model View Template (MVT)
Django follows MVC pattern very closely but it uses slightly different
terminology. The main difference between two pattern is MVT takes care of
the controller itself.
The MVT (Model View Template) is a software design pattern. It is
a collection of three important components Model View and
Template.
Model : ( Django models )
The Model helps to handle database.
Template : ( Django html pages )
Templates handles User Interface.
View : ( Django Controller )
The View is used to execute the business logic and interact with a
model to carry data and it renders a template.
View is the controller. There is no separate controller in Django.
Django framework handles all the controller parts by itself.
Hence Django implements MVT pattern.
pf2

Partial preview of the text

Download Model View Template Design Pattern and more Essays (high school) English in PDF only on Docsity!

Model View Template (MVT)

Django follows MVC pattern very closely but it uses slightly different terminology. The main difference between two pattern is MVT takes care of the controller itself. The MVT (Model View Template) is a software design pattern. It is a collection of three important components Model View and Template. Model : ( Django models ) The Model helps to handle database. Template : ( Django html pages ) Templates handles User Interface. View : ( Django Controller ) The View is used to execute the business logic and interact with a model to carry data and it renders a template.

View is the controller. There is no separate controller in Django.

Django framework handles all the controller parts by itself.

Hence Django implements MVT pattern.

  1. The user sends a URL request for a resource to Django.
  2. Django framework then searches for the URL resource.
  3. If the URL path links up to a View, then that particular View is called.
  4. The View will then interact with the Model and retrieve the appropriate data from the database.
  5. The View then renders back an appropriate template along with the retrieved data to the user