What are the different types of controllers?

What are the different types of controllers?

Controller definition: A visual force controller is a set of instructions that specify what happens when a user interacts with the components specified in associated Visualforce markup, such as when a user clicks a button or a link.

Controllers also provide access to the data that should be displayed in a page, and can modify component behavior.

Standard Controller: A standard controller consists of the same functionality and logic that is used for a standard Salesforce page. For example, if we use the standard accounts controller, clicking a Save button in a Visualforce page result in the same behavior as clicking Save on a standard Account edit page.

Custom Controller: A custom controller is a class written in Apex that implements all of a page logic.

If we use custom controller, we can define new navigation elements or behaviors, but we must also reimplement any functionality that was already provided in a standard controller.

Controller Extensions: A controller extensions is a class written in Apex that adds to or overrides behavior in a standard or custom controller. Extensions allow us to leverage that functionality of another controller while adding our own custom logic.

Source: https://www.udemy.com/course/salesforce-interview-question-with-answers/?utm_medium=648408&utm_content=promo&utm_campaign=2021-01-26&utm_source=email-sendgrid&utm_term=6501452&couponCode=LEARNSALESFORCE

0 views0 comments

Recent Posts

See All

Time

Time is like a river. You cannot touch the same water twice, because the flow that has passed will never pass again. Enjoy every moment in life!

Self-Growth Challenge

Start: Rich Dad Poor Dad Day 1: How to talk to anyone Day 2: The power of habit Day 3: Love Languages Day 4: Think and Grow Rich Day 5: 5 AM Club Day 6: The 7 Habits of highly effective people Day 7: