locked
Using JS AJAX or jQuery AJAX in combination with front end frameworks RRS feed

  • Question

  • User1750806012 posted

    I am learning more about the use of AJAX 
    And I noticed that Jquery AJAX code is much more simple vs the Javascript version.

    I heard that front-end frameworks like Vue, Angular and ReactJS are much faster than
    JQuery and if you add a JQuery element to the website it will slow down the website.

    So I would like to know what professionals use and recommend when it comes to working with Front-end frameworks like:
    ReactJs, Vue and angular.

    Thanks.

    Saturday, April 24, 2021 9:37 PM

Answers

  • User-474980206 posted

    jquery was an important framework for accessing the dom when browsers (especially IE) were not compatible. It was also the first popular ajax library.

    if you pick a framework like react, vue or angular, you have little need for jquery. as jquery main use is to update the dom directly, it should be avoided with these frameworks. so you are paying a high download cost for jquery just to get is ajax library.

    angular has its own ajax library which you should use. for vue and react the native fetch and XmlHttpRequest (required for upload status events) are common as is the ajax only library axios. 

    if you don't like fetch, you should try axios:

      https://www.npmjs.com/package/axios

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, April 25, 2021 12:08 AM

All replies

  • User1120430333 posted

    jQuery makes it easier to use JavaScript.

    jQuery Introduction (w3schools.com)

    Vue, Angular and React.Js are UI frameworks that use JavaScript.

    Angular vs React vs Vue: Which Framework to Choose in 2021 (codeinwp.com)

    Saturday, April 24, 2021 11:22 PM
  • User-1545767719 posted

    So I would like to know what professionals use and recommend when it comes to working with Front-end frameworks like:
    ReactJs, Vue and angular.

    Why don't you try to use react or angular to see the difference if you believe it is faster? Visual Studio 2019 provide the templates to generate react and angular project. They say seeing is believing.

    Saturday, April 24, 2021 11:30 PM
  • User-474980206 posted

    jquery was an important framework for accessing the dom when browsers (especially IE) were not compatible. It was also the first popular ajax library.

    if you pick a framework like react, vue or angular, you have little need for jquery. as jquery main use is to update the dom directly, it should be avoided with these frameworks. so you are paying a high download cost for jquery just to get is ajax library.

    angular has its own ajax library which you should use. for vue and react the native fetch and XmlHttpRequest (required for upload status events) are common as is the ajax only library axios. 

    if you don't like fetch, you should try axios:

      https://www.npmjs.com/package/axios

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, April 25, 2021 12:08 AM
  • User1750806012 posted

    Thank you in the beginning it was a little confusing for me but I understand it now
    So in summary: only use Jquery if you dont use React, vue or angilar because they have there own systems.

    Sunday, April 25, 2021 12:56 AM