Read fill post here
What is MVC?
Model View Controller, known as MVC separates the code as three components. MVC separates the business logic and presentation layer from each other. It was traditionally used for desktop graphical user interfaces (GUIs). Nowadays, MVC architecture has become popular for designing web applications as well as mobile apps.
- Model – This layer deals with data-related logic. For example, it can retrieve, change and save data to the database.
- View – We can call it the presentation layer. It is responsible for collecting data from the model or user and presenting it. In a web application, everything that is displayed in the browser falls under View.
- Controller – It controls the data flow and interaction between view and model. For example, a controller, based on a request or action, will collect data from a database with the help of Model and send it to the user through Views.
What is MVT?
Model View Template, widely known as MVT is another design pattern similar to MVC. Like MVC, the MVT design pattern also separates the code into three parts.
- Model – Same as the model in MVC. It contains the code responsible for dealing with data and databases.
- View – In MVT design pattern, the View is decides what data should be displayed
- Template – Templates are used to specify a structure for an output. Data can be populated in a template using placeholders. It defines how the data is presented. An example is a Generic list view that we can use to display a set of records from the database.