Force.com sites allow public websites to be created in, and hosted by, Salesforce, removing the requirement to configure, secure, and manage a web server. Visualforce pages that have direct access to Salesforce data via the page controller generate the site content.
In this chapter, we will create a Force.com site initially containing static content. We will then create a set of template pages to remove repetition of common markup. Finally, we will provide access to Salesforce data from a public website, allowing visitors to access records without logging in to Salesforce.
Unlike earlier chapters in this book, these recipes are best performed in order, as many recipes build on knowledge gained in earlier recipes and the first recipe, Creating a site, configures the Force.com site that is used to serve the content for all of the remaining recipes.