Salesforce Platform Developer I (legacy) — Question 25
Which type of code represents the Model in the MVC architecture when using Apex and Visualforce pages?
Answer options
- A. A Controller Extension method that saves a list of Account records
- B. Custom JavaScript that processes a list of Account records
- C. A list of Account records returned from a Controller Extension method
- D. A Controller Extension method that uses SOQL to query for a list of Account records
Correct answer: C
Explanation
The Model in MVC represents the data and business logic, which in this case is the list of Account records that is retrieved and returned from a Controller Extension method. Options A and D describe methods that interact with the data but do not represent the Model itself, while option B involves client-side processing and does not pertain to the Model in MVC.