+ Start a Discussion

What is VisualForce architecture ?

Ted Husted NUTed Husted NU
The long answer is here 

* http://www.salesforce.com/us/developer/docs/pages/Content/pages_intro_architecture.htm

The short answer is that Visualforce pages let you combine HTML markup and scriping statements, which, architecturally, are two separate concerns. 

To keep the concerns seprated, the base Visualforce pages handle the markup and refer to one or more "controllers" to handle the scripting.

Controllers are Apex classes and can retrieving dynamic data from your org or other sources, and act on the data, before revealing it to the page. A Visuaforce page can refer to data properties on the controller by placing markers in the Visualforce page, like {!$User.FirstName}. 

The Visualforce markup also allows use of standard and custom "components" which act like dynamic markup tags. Here's an example, 

<apex:commandButton action="{!save}" value="Save New Account Name"/>

This component creates a command button, and when someone clicks it, Visualforce calls the "save" method on the page's controller. 

Generally speaking, Visualforce is said to use a Model View Controller (MVC) architecture, because it cleanly separates the data source (model), the markup (View) and the input/output/navigational concerns (Controller). 

Wikipedia has a nice article on MVC 

* http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

The best idea is always to try it for yourself, and Salesforce makes trying Visualforce easy by providing a hands-on workbook. 

* http://www.salesforce.com/us/developer/docs/workbook_vf/

HTH, Ted. 

If this answer was the most helpful so far, please tag it as the best answer, so that others can benefit.
Hi Siva,

Visualforce is a Salesforce platform specific markup language, similar to HTML, which has been designed to help users create User Interface when customizing Salesforce to fit their requirement : 

Read the following to know how Visualforce is Architected: