MVC Diagram |
In MVC pattern, we differentiate our logic(controller), Mysql(model) and html(view).
View: It have all the Html parts of the page. Here we use the variables which we have set in controllers.
Model: MYSQL queries parts of the page, we make an object of the model in controller & call the functions of the model. after fetching the data, we set it in controller & use in view.
Controller: It have all the logic part of the site.
Its easy to understand.
ReplyDelete