Friday, July 25, 2008

Visualforce

Visualforce is a framework provided by Salesforce to build and deploy any kind of user interface in real-time. User interfaces build from Visualforce can have similar look and feel as the Salesforce web pages, or replace it with a complete unique style and set of interactions.


With introduction of Visualforce, salesforce.com created the first on-demand implementation of an MVC architecture. In the MVC architecture, the "model" represents the data model, the "view" represents the presentation of the data (user interface), and the "controller" represents the business logic that manipulates the data and controls the user interface.

Given below is an explanation of items in above diagram.

Pages


  1. "Canvas" or design surface similar to standard Web development model
  2. Composed of HTML, Page tags and merge fields
  3. Ability to reference any CSS, Flex, AJAX or other Web technology
  4. Supports standard query strings for parameters, referenced via /apex/page_name url syntax
  5. Composed on the server, not the client

Components

  1. Create Standard UI elements, such as detail areas and related lists, with a single tag
  2. Built in data binding
  3. Special UI elements, such as tab panels and repeat (iterators)
  4. Built in AJAX functionality supporting incremental page refresh
  5. Over 50 components in the first release
  6. Accessed through syntax

Controllers


  1. Controllers contain the logic and data references a page uses
  2. Separates presentation from logic
  3. Created in Apex code providing full access to Apex functionality (API, Web services,etc)
  4. Pages interact with controllers through components
  5. Maintain state across page interactions
  6. Standard controllers implement normal app behavior (view, edit, save, etc)


Referances:

No comments: