Newer Version Available
Visualforce Remote Objects
JavaScript remoting is a popular,
powerful, and efficient method for building Web apps with Visualforce, especially for creating pages
for use in the Salesforce app or working with JavaScript libraries such as jQuery or AngularJS.
Visualforce
Remote Objects are proxy objects that
enable basic DML operations on sObjects directly from JavaScript. Remote Objects remove some of the complexity
from JavaScript remoting by reducing the need
for @RemoteAction methods in an Apex controller or
extension.
Behind the scenes, the Remote Objects controller handles sharing rules, field level security, and other data accessibility concerns. Pages that use Remote Objects are subject to all the standard Visualforce limits, but like JavaScript remoting, Remote Objects calls don’t count toward API request limits.
Using Visualforce
Remote Objects consists of implementing two separate pieces of functionality on the same page.
- Access definitions, written in Visualforce with the Remote Objects components. These components generate a set of JavaScript proxy objects that you can use in step 2.
- Data access functions, written in JavaScript. These functions use the proxy objects that are made available by the access definitions to perform create, retrieve, update, and delete operations on your data.