Activity › Forums › Salesforce® Discussions › Which one to use and why – JavaScript Remoting and Remote Objects?
-
Which one to use and why – JavaScript Remoting and Remote Objects?
Posted by kapil on March 15, 2018 at 12:55 PMJavaScript Remoting and Remote Objects both perform same operations so which one to use and why?
shariq replied 7 years, 7 months ago 4 Members · 3 Replies -
3 Replies
-
Hi Kapil,
Visualforce Remote Objects:
- Makes basic “CRUD” object access easy
- Doesn’t require any Apex code
- Supports minimal server-side application logic
- Doesn’t provide automatic relationship traversals; you must look up related objects yourself.
JavaScript Remoting:
- Requires both JavaScript and Apex code
- Supports complex server-side application logic
- Handles complex object relationships better
- Uses network connections (even) more efficiently
Thanks
- [adinserter block='9']
-
Visualforce Remote Objects:
Makes basic “CRUD” object access easy
Doesn’t provide automatic relationship traversals; you must look up related objects yourself.JavaScript Remoting:
Requires both JavaScript and Apex code
Uses network connections (even) more efficientlyThanks
-
Hi,
Well, here are few advantages of “Visualforce Remote Objects” :
- No need to write Controllers, Everything can be done in Visualforce only.
- As @RemoteAction annotated methods needs to be static so you had to take special precaution as it didn’t
- supported Viewstate. This hurdle is completely removed now.
- No need to write Test Class now, as no Controller is involved.
Hope this helps.
Log In to reply.