Yes, that's right,
MVC Divides interactive applications into three distinct components:
â Model: Contains core functionality and data.
â View: Displays information to user.
â Controller: Handles user input.
also it Includes a change-propagation mechanism to Ensures consistency between user interface
and model.
Model:
-Encapsulates data.
-Exports procedures that perform specific application processing (used by Controller on behalf of user).
-Provides functions to access Modelâs data(Used by View, maybe Controller too).
-Manages change-propagation mechanism.
Maintains registry of components dependent on the model.
Views and controllers register their need to be informed about changes.
Changes in state of model trigger notifications.
⢠Responsibilities include:
â Providing functional core.
â Register dependent views and controllers.
â Notify dependent components about changes.
View
-Presents information to user(Different Views present information in different ways).
-Defines an update procedure that is activated by change-propagation mechanism in Model.
-Retrieves current data values to be displayed from Model.
-During initialization, associates itself with Model and registers for change notification.
-Corresponds to a single Controller.
-Offers functionality that allows Controller to manipulate display(E.g. scrolling).
Conroller:
-Accepts user inputs as events.
-Translates events into requests for the associated Model or View.
-Registers itself with Model if it depends on state of the Model in any way(E.g. A certain change in the Model results in a menu item being enabled or disabled).
from a document by:
Dr. Roger T. Alexander
[email protected]
MHD Yasir Al-lahham