In this tutorial, I am going to explain you about Visualforce in Salesforce.
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.
What is Visualforce Page?
Salesforce developer can develope Visualforce Page using Visualforce component.
Here is the syntax for Visualforce 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
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.
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
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
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
- 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