-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

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.
  • 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 '14 at 22:00
  • Good call. I'll edit the answer to more directly answer the question. – Marty C. Oct 27 '17 at 12:41
-3

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.