Custom Search

Saturday, November 14, 2009

Ajax Note-1

AJAX Note-1
*****************************************************
XML Http Request ----> Essence of AJAX

AJAX --> Asynchronous JavaScript and Xml

Asynchronous means your browser doesn't hang while making request to server.

*****************************************************
Tools Required
----------------------
Text Editor ---> Eclipse, Komodo
Browser --->Firefox
Web Server ---> Apache

You Should Know HTML, CSS and JavaScript to study AJAX.

*****************************************************
Customizing Firefox for AJAX Development
--------------------------------------------------------------
3 Essential Add-ons used for AJAX Development are

1) DOM Inspector
2) Firebug
3) Web Developer ----> Important features is "View generated Source code" and "Outline block level elements".

*****************************************************
Document Object Model (DOM)
-----------------------------------
* DOM is an important part of JavaScript and AJAX.
* Keep in mind that every thing in the browser window (Document) is an object.
* Object on a webpage (Document) is called DOM.
* Examples of objects in a webpage are table, title, h1 etc and page itself is an object called Document object.
* Objects have properties.
* Table, title, h1 etc are properties (nodes) of Document Object.
* Row is a property of table Object
* Cell or column is a property of row Object

*****************************************************
XML
-------
A way of showing data in a text format taht parsable by scripting languages.
-------------------------------------
* Here we not only talk about objects (things) in the web page but also thing in any kind of document. XML is a kind of document.
* A browser can parse and understand XML.
* A Scripting language (JavaScript) can parse and understand XML.
* So we can parse and look an XML file in browser.
* So we can parse and look an XML file in JavaScript. <---- Use DOM inspector to check it.
* So we can parse and look an XML elements or tags in JavaScript as JavaScript object. <---- Use DOM inspector to check it.
* So we can access value from XML elements or tags in JavaScript as JavaScript object. <---- Use DOM inspector to check it.
-------------------------------------
We can do the same things with XML and JavaScript that are doing with webpage (html) and JavaScript.
For example, we can get element by id.
-------------------------------------
* XML using object model, so we can use XML tags and ids to retrieve information from XML files.
* Because of this browser and Ajax using XML as a way of getting data.
* We can use JavaScript to retrieve information from XML file using XML tags and ids.
-------------------------------------

*****************************************************
XMLHTTPRequest
-----------------------------
It is the core functionality of AJAX.
-----------------------------
* XMLHttpRequest is a JavaScript object. Every object has some properties.
* So XMLHttpRequest Object has some properties and methods.
* XMLHttpRequest Object properties have several different statuses (default predefined values).

-----------------------------
*****************************************************

No comments:

Post a Comment