Explain the model-view-controller pattern.A pattern is defined as the structure / significant process for application development. The MVC pattern isolates the business logic for the user interface. The result of applying MVC pattern is to simplify the application development for visual appearance and the underlying business logic without affecting each other. A web application can be viewed as simple as that of consisting of only 3 parts irrespective of complexity. This gives the developers, web page authors and the database folks the flexibility to develop their individual goals or tasks.
As an architectural pattern it separates the presentation layer (the user interface), the domain logic and database access. The presentation layer is further divided into view and controller.Explain the model-view-controller pattern.Model-View-Controller (MVC) is a classic design pattern that offers applications an ability of maintaining multiple views of the same data.
The MVC pattern provides a clean separation of objects into
1. Models for maintaining data 2. Views for displaying all or a portion of the data 3. Controllers for handling events that affect the model or view(s).
Because of this separation, multiple views and controllers can interface with the same model. New types of views and controllers that never existed before can interface with a model without forcing a change in the model design.
|