-3

I came across multiple choice for sample exam But was not sure whether Custom Component comes under Model in MVC ? Choose two

Options were

  1. Custom Object

  2. Custom Component

  3. Apex

  4. Controller Extension

2 Answers 2

8

The correct answers are Custom Object and Apex, assuming that by Apex the writer behind the question meant the Apex properties inside controllers and extensions.

I won't bore you with what you can already find on Wikipedia about MVC, so on to Salesforce!

  • Visualforce pages and components are views
  • Apex controllers and extensions are all considered controllers
  • Your Sobject classes (e.g., OpportunityLineItem, AccountTeamMember) are the models. A model represents all the data transmitted between the page/component and the controller/extensions via properties.
2
  • This doesn't really line up with the question, but that's more a reflection of the sample exams out there and why they should be avoided.
    – Matt Lacey
    Jun 30, 2014 at 22:00
  • Good call. I'll edit the answer to more directly answer the question.
    – Marty C.
    Oct 27, 2017 at 12:41
-3

I would say that Custom Object and Custom Component are the correct answers. Apex and Controller Extension are Controllers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .