Visualforce : In our previous salesforce tutorial we have learned about Force.com platform.In this Salesforce Tutorial we are going to learn about visualforce, advantages of visualforce and different visualforce development tools.

What is Visualforce ?

Visualforce is a tag-based markup language like Hyper Text Markup Language(HTML). Visualforce has User Interface frameworks for building various attractive and dynamic applications.

what is visualforce

When working with visualforce in salesforce.com we have to learn many tags like in HTML. By using different tags and SOQL queries we develop Visualforce pages. In salesforce, when a developer wants to develop any application different development technologies can be used in Visualforce. Visualforce supports many development technologies like jQuery, JavaScript, CSS, HTML, Flash and Ajax.

Elements in Visualforce pages.

  1. Visualforce markup
  2. Visualforce controller.

Visualforce markup :- Visualforce markup is the first element. It consists of tags prefixed with apex:, HTML, JavaScript and different standard web development code.

Visualforce controller :- Visualforce controller is the second type element in Visualforce pages which has set of instructions to manipulate data and schema with user interactions. Visualforce controllers are of three types they are

  1. Standard controllers.
  2. Custom controllers.
  3. Extension controllers.

Standard Controllers :- Standard controllers are creates along with custom objects. These standard controllers will have same logic and functionality used standard visualforce pages.

Syntax :-<apex:page standardcontroller =”contact”></apex:page>

Custom controller :- When a developer needs different logic and functionality he/she may write their own Apex controller class.

Syntax :-<apex : page controller = “Mycontroller”></apex:page>

Extension controllers :-If we want to use both custom controller functionality and standard controller functionality we use extension controllers.

Syntax :-<apex:page standardcontroller = “contact” extensions = “Testclass1, Testclass2”></apex:page>

Where Visualforce page are used ?

In our previous salesforce tutorial w learned clearly about force.com platform. Different applications can be built in force.com platform with custom objects and standard objects. Every standard objects will have different customization’s like page layouts, sections, buttons, links and many other available for standard objects. But when we create custom objects we have to set all the user interface settings. By using visualforce page user interface styles, text fields, text boxes, pick lists and so on.

Through Visualforce pages only we can combine any type of data, any development technologies, any browser-based interfaces to develop applications in force.com platform.

Advantages of Visualforce.

  1. Visualforce is a Model View Controller (MVC)  development style.
  2. Visualforce Editor panel is present for every visualforce page.
  3. visualforce has Huge number of  components.
  4. Tightly integrated with visualforce.
  5. Can be integrated with HTML, CSS, Ajax, jQuery.
  6. Visualforce is flexible and customizable with web technologies.

Different Visualforce Deployment tools.

Visualforce pages can be build in three different ways. They are

  • Visual editor pane.
  • Force.com IDE.
  • Eclipse plugin for Force.com.
  1. Visualforce Controller architecture.
  2. Creating first Visualforce page.
  3. Visualforce Tags.
  4. Visualforce Controller Methods.