Newer Version Available

This content describes an older version of this product. View Latest

Introducing Visualforce

So how do we pass our candidate's addresses to the Yahoo! Maps Web Services? And after Yahoo! Maps Web Services renders an interactive map that plots those addresses, how do we pull that map into our app?

These requirements may seem intimidating, but they're actually quite easy to meet, thanks to Visualforce. Visualforce is a powerful and flexible framework for customizing your app's user interface far beyond what's available using the platform's point-and-click tools. It's the most efficient way to combine data from multiple Force.com objects, blend data from Web services into your apps, or customize the logic that dictates the behavior of your app's user interface. When you use Visualforce, you'll see your productivity increase, and you'll find that you can create just about any type of browser-based user interface you can imagine.

The Visualforce framework consists of a tag-based markup language, similar to HTML. In the Visualforce markup language, each Visualforce tag corresponds to a user interface component. Need a related list? Simply add the <apex:relatedList> component tag. Want to display a record's details? Just use the <apex:detail> tag.

The following graphic shows a few of the most commonly used Visualforce tags and how they correspond to user interface components. Over 125 tags exist, ranging from large components, such as a detail section of a standard page, to small components, like a single field or link. You can learn about them all in the Visualforce Developer's Guide, at www.salesforce.com/us/developer/docs/pages/index.htm.

Sample Visualforce Components and Their Corresponding Tags An Apex page with callouts to the apex:page, apex:commandLink, apex:image, apex:relatedList, apex:pageBlock, apex:dataTable, and apex:detail tags

The behavior of Visualforce components can either be controlled by the same logic that is used in standard Salesforce pages, or you can associate your own logic written in Apex. Apex is salesforce.com's programming language that runs in the cloud on Force.com servers.

Don't panic! You won't need to learn how to write Apex to create any of the features described in this book. Visualforce comes with a rich component library that allows you to quickly build pages without having to code a lot of functionality yourself. And because Visualforce markup is ultimately rendered into HTML, you can use Visualforce tags alongside standard HTML, JavaScript, Flash, AJAX, or any other code that executes within an HTML page. This means that we can create our Candidate Map by simply creating a Visualforce page that uses some basic Visualforce markup and JavaScript to pass our candidate addresses to Yahoo! Maps Web services.

To learn more about Apex, see the Force.com Apex Code Developer's Guide, at www.salesforce.com/us/developer/docs/apexcode/index.htm.

Note