Model View Controller is a design pattern, an architecture that helps us organize the code in three layers and that can be applied in projects.
But what is the MVC architecture like?
Model
He is responsible for data manipulation, writing, reading and validation.
View
The view is where the data is displayed to the user.
Controller
The Controller, on the other hand, receives the user's requests. Then they are passed to the Model and are displayed in the View.
Ah, beauty! I know how it is, but how does MVC work?
View: Hi Controller, Letícia Faleia is wanting to access your email.
Controller: Oops, I'm waiting for her to make the request.
Model: The data is correct! Controller, look at the response of the request.
Controller: Excellent! View can you show it to her on the screen?
View: Sure, Controller! I'll show…