In advanced MVC implementations, what is the role of a 'ViewModel'?
- Acts as an intermediary between the controller and the view
- Executes business logic
- Handles user authentication
- Manages database connections
In advanced MVC implementations, a 'ViewModel' acts as an intermediary between the controller and the view. It contains the data and business logic needed for the view, allowing the controller to focus on handling user input and updating the model. This separation enhances code maintainability and flexibility.
Loading...
Related Quiz
- What is the impact of using the 'strict' mode in CodeIgniter transactions?
- How does CodeIgniter handle nested transactions?
- What is the primary role of an OAuth authorization server?
- Which of the following best describes the 'View' component in MVC architecture?
- By default, which method is called in a CodeIgniter controller if no method is specified in the URL?