function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sumant HegdeSumant Hegde 

Public site or REST API?

Hi,

I have a requirement to create a form which collect the user entered data and also give an option to retrieve saved data. 
It should be designed for a non-salesforce users. 

So I have a couple of questions:
1. Should I use 'Public Sites' on force.com or should I use REST API.
2. If I use Public site, will I be able to use Standard Controller? If yes, how?
3. How to create REST Api and make use of it for non-salesforce users.


Regards,
Sumant Hegde
Raj VakatiRaj Vakati
please see my comments 

1. Should I use 'Public Sites' on force.com or should I use REST API.
   Yes .. Same like How you are doing in apex
2. If I use Public site, will I be able to use Standard Controller? If yes, how?
Yes .. Refer this link 
 https://developer.salesforce.com/page/Web2Lead_with_Force.com_Sites

3. How to create REST Api and make use of it for non-salesforce users.
            Yes you can. You will need to configure a public site and make the webservice available through it. 
https://developer.salesforce.com/blogs/developer-relations/2012/02/quick-tip-public-restful-web-services-on-force-com-sites.html