The M components in MVC are responsible for
2019
The M components in MVC are responsible for
- A.
user interface
- B.
security of the system
- C.
business logic and domain objects
- D.
translating between user interface actions/events and operations on the domain objects
Attempted by 108 students.
Show answer & explanation
Correct answer: C
Correct answer: The Model components are responsible for business logic and domain objects.
Manage domain objects and application data (state).
Implement business rules and enforce invariants.
Interact with databases or other persistence layers.
Provide an API for Controllers and Views to access and update data.
Common confusion: Distinguish the Model from the other MVC parts:
View — responsible for the user interface and presentation.
Controller — handles input and translates UI actions into operations on the Model.
Example: In a shopping cart application, the Model stores cart items, calculates totals, applies pricing and discount rules, and persists cart state.
A video solution is available for this question — log in and enroll to watch it.