When would a developer use a custom controller instead of a controller extension?

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!

A developer would opt for a custom controller when a Visualforce page is designed to completely replace the functionality of a standard controller. Custom controllers offer complete control over the behavior of the page as they are built from scratch. This is particularly useful in scenarios where the developer needs to customize the interactions and data handling beyond what is provided by standard controllers.

In cases where the Visualforce page needs to replace all default actions and logic provided by a standard controller, a custom controller is essential. This allows the developer to implement unique logic and manage data in a way that aligns with specific business requirements without being limited by the constraints of the standard controller.

The other choices hint at scenarios where different approaches should be considered. A controller extension is usually preferred when you want to build upon the functionality of an existing standard controller by adding new features or methods while maintaining the standard features. Choosing a custom controller means the developer is looking for a fresh start rather than extending existing behavior.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy