When MVC is applied, the application is divided into three layers: Data layer or Model, UI or View and Controller. Each layer of MVC has a different function. First, The UI or View layer is the user interface. It is the main interface between the users and the application. It is responsible for receiving user input and presenting the results. Then the controller is connected to all the components in the view layer, and it processes user input, sends data to the model layer, and sends the result back to the user. The model layer is where data is stored. It is responsible for controlling the data. In addition, a model layer is also responsible for reading and writing data to storage.