Force.com sites, Visual force Andrey Pruzan Solit 2012
Visualforce Controllers Visualforce Controllers A Visualforce controller is a set of instructions that specify what happenswhen a user interacts with the components specified in associated Visualforcemarkup, such as when a user clicks a button or link. Controllers also provide access tothe data that should be displayed in a page, and can modify component behavior.A developer can either use a standard controller provided by the Force.complatform, or add custom controller logic with a class written in Apex.
What are Custom Components?Similar to the way you can encapsulate a piece of code in a method and then reusethat method several times in a program, you can encapsulate a common design patternin a custom component and then reuse that component several times in one ormore Visualforce pages.All markup for a custom component is defined within an <apex:component> tag. This tagmust be the top-level tag in a custom component definition.
Ключевые моменты Force.com Sites:• The Force.com Sites technology utilizes Visualforce, the platform framework for building and deploying custom user interfaces• The URL for each site can use your unique Force.com domain or your own branded domain• Force.com Sites can easily generate Atom syndication feeds based on SOQL queries• Public access settings control which database objects and fields are accessible to visitors• You can easily use the built in content distribution network integration to cache pages
Для чего вы можете использовать Force.com Sites?• Corporate and Intranet web sites: You can run your entire public corporate web site on Force.com Sites, or create intranet sites by IP restricting the sites.• Microsites – Do you want only portions of your website to be accessible to external audiences? No problem! Using Force.com Sites, we create dynamic pages that can be used to obtain key information from end-users.• Web Applications – Have a need for an application accessible through a browser? Force.com Sites is the ideal solution for everything from ecommerce vending to automating complex business flows.• Custom Business Applications – Utilizing the Force.com cloud platform, you can have tailored business applications built without the need for costly investment in infrastructure. Our experienced and certified team delivers the specific know-how to develop the applications and processes using this secure, reliable, and fast platform to meet your business needs.
Authenticated Sites and Custom PortalsYou may want to authenticate visitors to the site though. For example, if you want topermit someone to submit a resume against one of the listed Job Openings, you maywant to authenticate them. This essentially becomes a "portal.”In general, there are 3 general categories of Salesforce.com Portals:• Customer Portals• Authenticated Sites• Salesforce.com SitesIn each of these you are giving access to your salesforce.com data to people who arenot users of your salesforce system.
Creating a Force.com siteTo create a basic Force.com Site, you need to follow the following four steps:1) Register a domain name2) Create a Force.com Site using the domain name3) Assign Visualforce pages to the Site4) Set up the security access permissions
URL patch and sitesOnce you register your Force.com domain name you can create up to 25 sites under thisdomain name (Enterprise Edition and Unlimited Edition). Developer Edition environmentscan create 1 site. Each of these sites will have a unique path in the site URL to differentiateone site from another. The location is optional, as you saw in the tutorial. The followingfigure shows the general URL path structure. A site consists of 3 components: The Force.com domain name that uniquely identifies your specific organization (case insensitive) The path identifies the specific site (case sensitive) A Visualforce page that is associated with your site (case insensitive)