Site Loader
Get a Quote

In this tutorial, I am going to explain you about Visualforce in Salesforce.

Introduction:

Visualforce is a platform that allows developers to develop their own custom user-interface in Salesforce.Visualforce can be hosted by Force.com. It is based on tag-based markup that is similar to HyperText Markup Language(HTML). We can develop their own custom user interface by using Visualforce Pages. Like HTML Visualforce supports many technologies like Jquery, Javascript, AJAX, and CSS.

Before developing Visualforce Page we have to learn many tags similar to HTML.Visualforce Pages can be developed using markup and SOQL queries.

You can learn Introduction to salesforce here.

Visualforce

What is Visualforce Page?

Salesforce developer can develope Visualforce Page using Visualforce component.

Here is the syntax for Visualforce page

<apex:page></apex:page>

There are the following Element that a Visualforce page uses.

1- Visualforce Markup.

Visualforce markup consists of tag-based markup to develop a user interface.Visualforce

Markup also uses Javascript, Jquery, CSS to develop User Interface.

2- Visualforce Controller.

Visualforce Controller nothing more than apex class.Visualforce Controller consists of Set of Instructions that specify what happens when a user is going to interact with the Visualforce Page.

It also consists of logic to perform manipulation on data. It also performs actions when User Clicks on button or link.

There is three type of Visualforce Controller.

  • Standard Controller
  • Custom Controller
  • Extension Controller.

1-Standard Controller:

Standard Controller belongs to Custom Objects(Account, Contact) i.e. Standard controller creates along with the custom object.This Standard Controller consists of same logic that a Standard Visualforce Page contains,

Here is the syntax for declaring Standard Controller in Visualforce Page

<apex:page standardcontroller="contact"></apex:page>

2-Custom Controller:

When a developer wants to develop his own logic and functionality he may write his own apex class.A Custom controller is an Apex class that contains page’s logic, without leveraging a standard controller.Custom controller is executed in system mode similar to Apex Class.

Syntax for declaring Custom

<apex:page controller=”customcontroller></apex:page>

3-Extension Controller:

Extension controller is used when we want to get the functionality of both Custom Controller and Standard Controller. Suppose we want to add or override functionality to existing

Standard or Custom Controller Extension Controller is a good technique to achieve this.

Advantages of Visualforce:

  • Visualforce uses MVC Pattern
  • Developed to integrate HTML,Javascript,Jquery,CSS.
  • Contains a huge number of Component.
  • Easy to customize

Tools used for Visualforce Deployment

  • Visual editor pane
  • com IDE
  • Eclipse plugin for Force.Com

Hope this session will help you

Than You

 

Post Author: TechieFlair

Leave a Reply

Your email address will not be published.