MVC
MVC
1. Model
A model is data used by a program. This may be
a database, file, or a simple object, such as an icon or a
character in a video game.
2. View
A view is the means of displaying objects within an
application. Examples include displaying a window or
buttons or text within a window. It includes anything that
the user can see.
3. Controller
A controller updates both models and views. It
accepts input and performs the corresponding update. For
example, a controller can update a model by changing the
attributes of a character in a video game. It may modify
the view by displaying the updated character in the game.
The three parts of MVC are interconnected (see diagram).
The view displays the model for the user. The controller
accepts user input and updates the model and view
accordingly. While MVC is not required in application
design, many programming languages and IDEs support
the MVC architecture, making it a common choice for
developers.
3 tier architecture