Is AJAX a separate language from Javascript, or is it a JavaScript framework?

Basically, is AJAX similar to JavaScript in syntax and semantics?

+8
javascript ajax frameworks
source share
5 answers

AJAX is not a language. This is a methodology using JavaScript and XML (and I assume that JSON is also suitable there) so that the web client asynchronously communicates with the server resource without requiring custom browser events (for example, page navigation).

+8
source share

AJAX stands for Asynchronus Javascript and XML: http://en.wikipedia.org/wiki/Ajax_%28programming%29

Ajax is a javascript methodology for receiving data from a server in real time. This syntax (especially when used in things like jQuery) is just javascript ... Today you can just use one function to call ajax (using jQuery):

$.ajax({ url: "test.html", success: function(){/*do stuff here*/}}); 

The old ajax school (as mentioned below, in the late 90s and early 00s) looks more like this: http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_first

 function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","ajax_info.txt",true); xmlhttp.send(); } 
+2
source share

Actually, "AJAX" is not suitable for Asynchronous JavaScript and XML . This is just an asynchronous method of loading data using Javascript.

+1
source share

None. It refers to the task of creating (using JavaScript) an HTTP request (and processing the response to it) without leaving the user from the current page (for example, by link or by submitting a form).

There are several ways to do this (XMLHttpRequest, generating <script> elements using a hidden iframe, etc.) and many libraries (YUI, Mootools, Prototype, jQuery, Glow, etc.) that implement helper methods to simplify .

So it is not a language, API, library or structure. This is just a thing that can be done (in various ways).

(It was also used as a replacement term for "DHTML", but its use, for example, with the replacement for "HTML 5" - marketers need a new buzzword to describe "Performing any fancy stuff on the Internet every few years."

+1
source share

No, this is a way to combine technology to create web applications. Here's an article promoting the name AJAX that says:

Ajax is not a technology. Its really several technologies, each of which thrives on its own, uniting in a new way. Ajax includes:

  • Standard presentation using XHTML and CSS;
  • dynamic display and interaction using the document object model;
  • data exchange and manipulation using XML and XSLT;
  • Asynchronous data retrieval using XMLHttpRequest;
  • and JavaScript linking everything together.
0
source share

Source: https://habr.com/ru/post/651001/


All Articles