Notes about Jquery, AJAX and PHP

Few days back, I had to look at a web app that used Jquery and AJAX (as could be seen on browser side code) and I was told the app uses PHP. So I did some digging up on these topics and this post has the related notes. This work has come to a close now and so I don't expect to update this post in the near future. It was interesting to get some understanding of these technologies as lot of legacy apps seem to use it.

Jquery vs React: Comprehensive Guide for Developers [2024], https://www.simplilearn.com/jquery-vs-react-article , Jul. 2024.
Main point(s) from above:
As React uses virtual DOM, it is faster that jQuery which traverses whole DOM tree.
As React uses component approach it is more suitable than jQuery for large applications. The codebase is easier to maintain.
---

Seems to be a great video: jQuery vs Vue, React and Angular, https://www.youtube.com/watch?v=WJ2PQe-pQJw , around 15 mins, Apr. 2018. Associated article link is broken.


AJAX Introduction, https://www.w3schools.com/xml/ajax_intro.asp ... Has simple code example ... "AJAX just uses a combination of:" "A browser built-in XMLHttpRequest object (to request data from a web server)" (and) "JavaScript and HTML DOM (to display or use the data)" .. "AJAX is a misleading name. AJAX applications might use XML to transport data, but it is equally common to transport data as plain text or JSON text."

Fetch vs ajax vs XMLHttpRequest why is Fetch so much more incredibly fast?, https://stackoverflow.com/questions/70882625/fetch-vs-ajax-vs-xmlhttprequest-why-is-fetch-so-much-more-incredibly-fast, Jan. 2022.


XMLHttpRequest, https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest : "XMLHttpRequest (XHR) objects are used to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing." .. "Despite its name, XMLHttpRequest can be used to retrieve any type of data, not just XML."

Very interesting video as it explains differences between fetch, axios, XHR and also jQuery when it comes to fetching data (till around 8 min. 15 secs in video): Fetch vs Axios vs XHR (+3 Other Options), https://www.youtube.com/watch?v=gObEH6Zb1m0, 12 mins, by ByteGrad, Jul. 2022.

========================

Single PDF tutorial book (63 pages, pdf pages:72) that seems to give a good quick overview: PHP programming cookbook, https://assets.ctfassets.net/nkydfjx48olf/5qFMF3mvitLMahX67i7iOb/028229996c13cbc27a0538f055a41b46/php_cookbook.pdf
Quick read restart point: page 26/72
Link given in above pdf: PHP Form Validation Example, https://www.webcodegeeks.com/php/php-form-validation-example/ Source files download: Form-Validation.zip
Link given in above pdf: Login Form in PHP Example, https://www.webcodegeeks.com/php/login-form-php-example/
Source code: php_loginform_example.zip



PHP RESTful Web Service API – Part 1 – Introduction with Step-by-step Example, https://phppot.com/php/php-restful-web-service/

Comments