Archive for July 7th, 2008|Daily archive page
AJAX and XMLHTTPRequest
AJAX stand for Asynchronous JavaScript and XML and the name AJAX arrived on the scene in 2005 despite the technology already existing since 1996 but with no name. The A in AJAX stands for asynchronous but what does this mean? Asynchronous is objects and events that are not coordinated in time. The asynchronous operation means that a process operates independently of other processes.
The XMLHTTPRequest object specification defines an API that provides scripted client functionality for transferring data between a client and a server; it can use JavaScript and other web browsers to transfer XML and other text data between a web server and a browser. The XMLHTTPRequest can do synchronous fetches but it is virtually always asynchronous. The XMLHTTPRequest will be treated defiantly in different web browsers for example internet explorer and Firefox. IN internet explorer an application called ActiveX is used, ActiveX is a component object model which can create software components that perform a function or a set of functions. The software then composes one or more components to provide the function, the code used to enable this function is
Var objXMLHTTP = new ActiveXObject(‘Mircosoft.XMLHTTP’);
Within Firefox XMLHTTPRequest was created in order to support the properties of ActiveX within the XMLHTTP, this would also apply to other web browsers such as safari.
The readyState function role within the XMLHTTPRequest is to retrieve the current state of the request operation. An example of the code:
[nState=] XMLHTTPRequest.readyState
The major benefits of the XMLHTTPRequest is that it is used by most web developers and can implement responsive and dynamic web applications, an example of websites that use the XMLHTTPRequest are Google maps and Face book.
http://searchnetworking.techtarget.com/sDefinition/0,,sid7_gci211605,00.html
http://www.w3.org/TR/XMLHttpRequest/
http://developer.mozilla.org/en/docs/AJAX:Getting_Started
http://msdn.microsoft.com/en-us/library/ms534361(VS.85).aspx
Leave a Comment