Javatpoint Logo
Javatpoint Logo

Visualforce - Salesforce Tutorial

Visualforce Pages Tutorial

Visualforce Pages Tutorial is designed for both beginners and professionals. Our tutorial provides all the basic and advanced concepts of Visualforce Pages.

Visualforce Pages is one of the most important concepts of Salesforce. Just like HTML and XML, VF(Visualforce) is also a Markup Language that was developed by Salesforce.com.

Our Visualforce Pages tutorial includes all the topics of Visualforce, such as Component and Controller.

What is Visualforce?

Visualforce is a markup language developed by Salesforce.com that contains Components and Controllers. The components are also referred to as tags in Visualforce. For the frontend design, it uses XML-like syntax, and for the backend, it uses apex to implement business logic. Visualforce and apex are both used for creating Visualforce Pages up to 15MB.

What is Visualforce Page?

Visualforce Pages have some unique components that make it easy to create a feature-rich user interface for Force.com. Standard web technologies such as HTML, CSS, JavaScript, and JQuery are used by Visualforce Page.

Visualforce Components

Small and reusable piece of functionality for implementing high Visualforce page is referred to as Visualforce components. Salesforce.com mainly provides two types of components, i.e., Standard and Custom components.

Standard Component

Salesforce.com provide more than 50 standard user interface components which are started with <apex: TagName></apex: TagName>. By using these standard components, we can create the perfect look and feel of Salesforce without taking additional support from HTML and CSS.

Custom Component

Custom components are the user defined components and tags that starts with <c: TagName></c: TagName>

Visualforce Controller

A set of instructions that defines what happens next after interacting with the components and tags specified in the associated Visualforce markup. Salesforce provides mainly three types of controllers, i.e., Standard controllers, Custom controllers, and Extension controllers.

Standard Controller

The controller which is used for customizing both Standard and Custom objects is referred to as the Standard controller. The standard controller has access to the salesforce database. It automatically adjusts to the type of pages based on where it is called.

Custom Controller

Unlike the Standard controller, the Custom controller is an Apex class that is used for implementing all the login of the VF page without leveraging the standard functionality. The custom controller is mainly used for creating rich UI with complex data sets.

Extension Controllers

Just like the Custom controller, the Extension controller is also an Apex class that is used for adding and extending the functionality of the Standard and Custom controller. The Extension controller is also used for overriding the methods.

Note: We can add multiple extensions on a VF page using comma-separated values.

Prerequisite

In order to work with Visualforce pages, it is required that we should have knowledge of HTML, CSS, and Apex programming. Apex follows Oops concepts, so readers of this tutorial should also have knowledge of Oops concepts.

Audience

This tutorial is helpful for those students who are interested in gaining knowledge about Salesforce CRM. This tutorial covers all the basics of Visualforce pages.

Problems

We assure you that you will not find any problems with this Visualforce page tutorial. But, if there is any mistake, please post the problem in the contact form.

Why should we use Visualforce in Salesforce?

Visualforce is one of the most important concepts in Salesforce. VF page is the combination of VF(Visualforce) and Apex, where VF is used for the front end, and Apex is used for the back end.

Salesforce is all about no software; why should we need to learn about developing with VF? There are mainly two reasons to learn about VF, which are as follows:

  1. We need to use VF in Salesforce for extending and customizing the look and feel of the Salesforce instance.
  2. We use VF for website designing with highly sophisticated user interfaces.
Why should we use Visualforce in Salesforce

In Salesforce, VF is one of the most used tag-based markup languages having user interface frameworks to design VF pages, websites, and dynamic applications. VF supports technologies such as HTML, CSS, JavaScript, JQuery, Flash, and AJAX.

These are some other reasons for using VF in Salesforce, which are as follows:

  1. By using Visualforce, we can build or design wizards and other multistep processes.
  2. We can create our own custom flow control by using an application.
  3. We can define navigation patterns and data-specific rules for optimal, efficient application interaction.
  4. By using VF, we can create such components which we can embed into dashboards or can access from their own custom tab.
  5. We can easily embed the sections within the detail page.
  6. We can easily design sophisticated websites unrelated to Salesforce.
  7. We can design VF pages with small code.
  8. We can easily display the activities for the last ten months by creating a VF page and embedding that section at the top of the contact detail page.
  9. We can easily design high-quality data-driven email templates in Salesforce by using VF.

Where can we use Visualforce pages?

In Salesforce, we use Visualforce pages when we need:

  1. To override the standard buttons such as New, Save….etc.
  2. To create VF tabs or to override custom tabs.
  3. To embed components in a detailed page layout.
  4. To create dashboard components on custom help pages.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA