Study for the Salesforce Platform Developer Exam. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Practice this question and more.


In MVC, which component executes business logic on the Salesforce platform?

  1. Model

  2. View

  3. Controller

  4. API

The correct answer is: Controller

In the Model-View-Controller (MVC) architecture, the component responsible for executing business logic is the Controller. The Controller acts as an intermediary between the Model and the View. It listens for user input, processes that input (which may involve applying business rules or logic), and then communicates with the Model to retrieve or update data as necessary. After processing, the Controller will often update the View to reflect any changes in the Model or to present new information back to the user. This separation of concerns allows for more manageable code, where different components can be developed and maintained independently. In the context of Salesforce, this typically involves Apex classes that serve as Controllers, which handle the logic necessary to process data and enforce business rules before it is either saved to the database (interacting with the Model) or displayed to the user (updating the View).