MVC Pattern in a Nutshell
Model View Controller (MVC) is an architectural pattern, which is mostly used in OOP frameworks like Laravel or Symfony to break up code into three logical components that serve specific purposes. These components can be found in the name of the pattern:
- Model represents the data or business logic.
- Controller handles requests, processes data, and loads the appropriate view.
- View represents the visualization of the data to the client (browser). This can also be defined as the presentation logic.
Let’s see the MVC interaction in the diagram below: