More than 80% of all web application frameworks rely on the architecture of the Model View Controller. The secret of the popularity of this pattern is how rationally it separates the application logic from the interface that forms the 3 components reflected in the name of the architecture.
Model
The Model knows everything about an app's content and structure. It communicates the way an updated interface should look directly to the View when receiving user input data from the Controller.
View
This is the front end of the app. It knows the layout and how any of its parts can be interacted by a user. The View receives user input, communicates it for analysis to the Controller, and updates or reassembles itself in accordance with the instructions of the Model (or the Controller if a change is minor).
Controller
The Controller is the Model View intermediary. It receives user input from the View,
processes it, and tells the Model (or View) what changes are to be made.
Some people argue that the controller is not always necessary and the most important thing is to separate the logic from the interface, that is, the model and the view.
The project is transparent, flexible and easy to maintain when each component in an architecture is responsible for a single line of tasks. The architecture of the MVC also allows:
Model
The Model knows everything about an app's content and structure. It communicates the way an updated interface should look directly to the View when receiving user input data from the Controller.
View
This is the front end of the app. It knows the layout and how any of its parts can be interacted by a user. The View receives user input, communicates it for analysis to the Controller, and updates or reassembles itself in accordance with the instructions of the Model (or the Controller if a change is minor).
Controller
The Controller is the Model View intermediary. It receives user input from the View,
processes it, and tells the Model (or View) what changes are to be made.
Some people argue that the controller is not always necessary and the most important thing is to separate the logic from the interface, that is, the model and the view.
The project is transparent, flexible and easy to maintain when each component in an architecture is responsible for a single line of tasks. The architecture of the MVC also allows:
- Parallel development (less time to deliver)
- Code reuse
- Fixing or modifying one of the components without having to update the others
- Setting SEO-friendly URLs.
Many web frameworks have incorporated the MVC pattern, so make sure that the frame of your choice is based on this architecture if you are interested in it.
Comments
Post a Comment