MVC Design Pattern

MVC - Model-View-Controller - is a design pattern for the architecture of web
applications. It is a widely adopted pattern, across many languages and implementation frameworks, whose purpose is to achieve a clean separation between three components of most any web application:

• Model: business logic & processing
• View: user interface (UI)
• Controller: navigation & input

1. Model- This component manages the information and notify the observers when the information changes. It represents the data when on  which the application operates. The model provides the persistent storage of data, which manipulated by the controller.

2. View- The view displays the data , and also takes input from user. It renders the model data into a form to display to the user. there can be several view associated with a single model. It is actually representation of model data.

3. Controller- The controller handles all request coming from the view or user interface. The data flow to whole application is controlled by controller. It forwarded the request to the appropriate handeler. Only the controller is responsible for accessing model and rendering it into various UIs.



The central idea behind MVC is code reusability and separation of concerns.

<<Previous>><<Next>>

No comments:

Post a Comment