Model-View-Controller(MVC) Architecture Pattern :-
It can be understood properly, with a suitable diagram :-
- The model - It means that the domain that the software is built around. Models are based on real world items such as a person,bank account and etc. For example, if we were building a blog, our models might be post and comment. Models are typically permanent and will be stored often in the database. The model acts as both a gatekeeper and a data store.
- The view - It can be stated as the visual representation of a model, It is responsible for generating a user interface, normally based on data in the model. For example, an online store will have a list of products to be displayed on a catalog screen. This list will be accessible via the model, but it will be a view that accesses the list from the model and formats it for the end use. Although the view may present the user with various ways of inputting data, the view itself never handles incoming data. The view’s work is done once the data is displayed.
- The controller - It can be termed as the coordinator that provides the link between the view and the model. The controller is responsible for processing input, acting upon the model, and deciding on what action should be performed, such as rendering a view etc.
No comments:
Post a Comment