Visual Force Interview Questions

1. What is visualforce? 

Visualforce is tag based markup language to develop customized user interface in salesforce.

2. What is visualforce controller in salesforce? What are they? 

Visualforce controller is a set of instructions that specify what happens, when user interacts with components on visualforce pages, such buttons & links. There are three types of controllers. They are. Standard Controller, Custom controller & Controller extensions.

3. What is Standard Controller? 

Standard controller provides the salesforce in built functionality to interact with visualforce pages. You can use the standard actions like Save, Edit, Cancel & delete by using standard controllers.

4. What are expressions used in pages to bind in controllers? 

Using methods we can bind.

Getter:Will return value from controller to vf page

Setter:Will pass value from vf page to controller

Action:Will redirect to another page.

5. Compare and contrast custom controllers and controller extensions.  How are they the same?  How are they different?

Both allow for custom code to be used, allowing for custom data sets and custom actions.  Extensions leverage the existing data and actions within a standard or custom controller.  Custom controllers must contain all data and actions that need to be executed by the page.  Extensions that extend standard controller allow for the pages which use those extensions to be used in custom buttons, standard button overrides, and over declarative features.

6.What identifies a controller as being an extension?

The controller must declare a constructor which takes another controller explicitly.  For example:


7. What is Standard List Controller?

Standard List Controller allows to display list of records in visualforce page. Standard list controller provides additional pagination actions (First, Lat, Next & Previous) compared to standard controller. Syntax: defining this controller is similar to standard controller. But need to add one more attribute recordSetVar.

8. What is Custom Controller?

Custom controller is an apex class that implements customized logic to visualforce pages. We can override or create new functionality by using custom controllers. Syntax:

9. What are the Global Key words?

We have global keywords like component,User,url,current page etc., to access various values from components on page, from user object or from url or from current page fields. To access value from each source, we have different global keywords. One such keyword is explained in above question(!$component)

Various global keywords are:

  1. URL
  2. USER
  4. Resource
  5. Component
  6. Current page
  7. Page reference etc.
Gopal Das
Follow me

Gopal Das

Founder at GopalDas.Org
He is a technology evangelist, Salesforce trainer, blogger, and working as a Salesforce Technical Lead. After working in Java based project implementation, he jumped to the Salesforce system on a whim and never looked back. He fell in love with Salesforce’s flexibility, scalability, and power. He expanded his knowledge of the platform and became a Certified App Builder, Administrator, Platform Developer I, SalesCloud Consultant while leading the Salesforce implementation and technology needs. He has worked in a wide variety of applications/services like desktop, web and mobile applications.
Gopal Das
Follow me

Leave a Reply

Your email address will not be published. Required fields are marked *