Tuesday, September 9, 2014

MVC Devolopment Pattern


What is MVC?


MVC was one of the seminal insights in the early development of GUI s.Is is one of the first approaches to describe and implement software constructs in terms of their responsibilities.MVC stands for Model-View-Controller is a Software design pattern for implementing user interfaces. It separates the representation of information from user interactions.This separation of components allows great code re-usability and logical separation of program responsibilities which means code is more organized.This software pattern has three components.

MVC Components


  • Model

 Model is a representation of data, Business rules and functions.All the CRUD (Create,Read,Update,Destroy) functions are defined here. model notifies its associated views and controllers when there has been a change in its state. This notification allows the views to produce updated output, and the controllers to change the available set of commands. In some cases an MVC implementation might instead be "passive," so that other components must poll the model for updates rather than being notified.
  • View

View is the representation of information that presented to the user. All the HTML rendering takes place in the view.
  • Controller

Controller is the intermediary between Model and view. It decides what to do according to the users input.It sends messages for both View and Model to do specific tasks according to the users input.


Interactions





No comments:

Post a Comment