Activity Forums Salesforce® Discussions What is the difference between AJAX and REST in Salesforce?

  • Sanjana

    Member
    July 11, 2018 at 9:36 am

    Hello Prachi

    AJAX stands for Asynchronous JavaScript and XML. It is a group of web development programs used to design websites. The programs create interactive web applications using a combination of XHTML for basic programming, CSS for styling, DOM for interaction, data exchange using XML and XSLT, XMLHttpRequest and JavaScript.

    REST stands for Representational State Transfer. It is a type of software architecture for distributed systems.

    • This reply was modified 5 years, 9 months ago by  Sanjana.
  • Avnish Yadav

    Member
    September 10, 2018 at 6:39 am

    Hi Prachi,

    JAX basically refers to making an asynchronous request in JavaScript, traditionally sending/receiving XML (although nowadays, JSON is often used instead of XML). So that's the technique you use on the client-side.

    REST is a concept for HTTP request exchange, so you're making RESTful request calls (e.g. 'get') against the REST-API  you implemented on the server side.

    Thanks.

  • Parul

    Member
    September 10, 2018 at 6:56 am

    Hi Prachi,

    Asynchronous Javascript and XML". Ajax loosely defines a set of technologies to help make web applications present a richer user experience. Data updating and refreshing of the screen is done asynchronously using javascript and xml (or json or just a normal http post).

    "Representational State Transfer". Applications using REST principles have a Url structure and a request/response pattern that revolve around the use of resources. In a pure model, the HTTP Verbs Get, Post, Put and Delete are used to retrieve, create, update and delete resources respectively. Put and Delete are often not used, leaving Get and Post to map to select (GET) and create, update and delete (POST)

     

    Thanks.

  • shariq

    Member
    September 15, 2018 at 10:42 am

    Hi,

    AJAX stands for asynchronous javascript and XML so if you are using javascript to load data after the browser request has finished you are doing AJAX.

    REST on the other hand stands for Representational State Transfer which as Stefan Billet pointed out uses HTTP requests to transfer data.

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs