Junior — Middle
Which component is responsible for processing data after the controller in the MVC architecture?
sobes.tech AI
Answer from AI
In MVC (Model-View-Controller) architecture, after the request is processed by the controller, the Model is responsible for data processing.
The controller accepts incoming requests, interacts with the model to retrieve or modify data, and then passes the results to the view for display.
Thus, the Model is responsible for business logic and data handling — for example, database access, validation, and data processing.
Example in Java:
public class UserController {
private UserModel model = new UserModel();
public void handleRequest() {
UserData data = model.getUserData(); // Model processes data
UserView view = new UserView();
view.display(data);
}
}