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?

  • kapil

    Member
    March 15, 2018 at 12:55 pm

    JavaScript Remoting and Remote Objects both perform same operations so which one to use and why?

  • PRANAV

    Member
    March 15, 2018 at 1:55 pm

    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

  • Parul

    Member
    September 18, 2018 at 7:36 pm

    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 efficiently

    Thanks

  • shariq

    Member
    September 19, 2018 at 9:03 pm

    Hi,

    Well, here are few advantages of “Visualforce Remote Objects” :

    1. No need to write Controllers, Everything can be done in Visualforce only.
    2. As @RemoteAction annotated methods needs to be static so you had to take special precaution as it didn’t
    3. supported Viewstate. This hurdle is completely removed now.
    4. No need to write Test Class now, as no Controller is involved.

    Hope this helps.

Viewing 1 - 4 of 4 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos