Model-View-Controller, or MVC, is a design pattern that is often used in creating web / mobile applications.
Definition of MVC objects
- Model objects are used to represent the data in your application. If designed appropriately, model objects can be reused in multiple projects. This is especially important in cross-platform scenarios. For model objects to be reusable, they should not know details about how your views and controllers operate.
- View objects represent things on screen. For instance, a button or a table view would be view objects. Primary responsibilities for view objects include drawing themselves on screen and responding to events. View objects should not have direct access to the model.
- Controller objects are used to coordinate the models and the views to create the application. Controllers can fetch data from the model and hook it up to the corresponding views in the application. When data needs updated or saved, the controller can help facilitate this task by leveraging the model. Controllers are also responsible for handling application flow, e.g. navigating between screens.
Thanks to : codesnack.com