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.
Elements in Visualforce pages.
- Visualforce markup
- Visualforce controller.
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
- Standard controllers.
- Custom controllers.
- 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.
- Visualforce is a Model View Controller (MVC) development style.
- Visualforce Editor panel is present for every visualforce page.
- visualforce has Huge number of components.
- Tightly integrated with visualforce.
- Can be integrated with HTML, CSS, Ajax, jQuery.
- 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.
- Visualforce Controller architecture.
- Creating first Visualforce page.
- Visualforce Tags.
- Visualforce Controller Methods.