CONTROLLER: The controller is like a traffic cop. Whenever user requests any resource it first goes to the controller.Controller then interact with both model and view.MODEL:The model is responsible for the data for the application and also it creates data for the view. It handles data processing and database works part.VIEW:It is presentation layer.
MVC Components
Caption: : This figure shows how the event is handled.
Slide 4
Advantages and disadvantages of MVC
ADVANTAGES:In three tier architecture, seperation of concern ie. independent of UI and business layer. Business logic is independent and can be used from different presentation layers.DISADVANTAGES:In a view, managing a state(ie. view state) is a painful process. But it can be achieved by using Javascript/Ajax in the view page.
Slide 5
What is view engine?
The view engine is responsible for creating HTML from your views.
Views are usually some kind of mix up of HTML and a programming
language. The pattern behind most of these is called two step view.If you have a Web application with many pages, you often want a consistent look and organization to the site. If every page looks different, you end up with a site that users find confusing. You may also want to make global changes to the appearance of the site easily, but common approaches using template view (350) or Transform view (361) make this difficult because presentation decisions are often duplicated across multiple pages or transform modules. A global change can force you to change several files.Two step view:Deals with this problem by splitting the transformation into two stages. The first transforms the model data into a logical presentation with a actual formatting needed.This way you can make a global change by altering the second stage, or you can support multiple output looks and feels with one second stage each.