Ajax Introduction



Ajax introduction tutorial provides basic information about AJAX. Before learning the AJAX, we must have the prior knowledge of following technologies. You can learn these technologies by visiting the below links –

No Technology Need for learning
1 HTML Tutorials Provides foundation for creating web pages
2 CSS Tutorials Helps in styling the webpages.
3 JavaScript Tutorials Helps to provide and add interactivity to webpage
4 XML Tutorials Provides basic information for interchanging the data

Tutorial will provide basic knowledge for learning AJAX.

Ajax Introduction :

  1. AJAX stands for Asynchronous JavaScript And XML.
  2. AJAX is a latest technology used for creating faster and interactive web applications using XML and JS.
  3. AJAX is independent of web server software.
  4. AJAX uses XHTML for content and CSS for presentation.
  5. AJAX also uses Document Object Model and JavaScript for Dynamic content display.
  6. AJAX mostly uses XML format for receiving server data
  7. AJAX sends the requests information from the server in the background, during request user can continue his work.

Older Vs Ajax applications

Working of older applications

  1. In the old web application user need to send the request to web server using the events.
  2. At the web server end the server will process the request and send response back to the browser
  3. During this complete communication, Browser need to wait for the response.
  4. Request sent to server is considered to be synchronous

Working of AJAX applications

  1. User can trigger the server request using the events (like click,double click,hover)
  2. User can resume his work though he did not receive the response from the server.
  3. The response sent by the server is usually in the form of XML.
  4. JavaScript will interprete the result and update the current screen or part of the current screen.
  5. In the real sense user will never know that server request has been sent. Also the response can be bind to the part of screen without reloading the complete page.
  6. In the next tutorial we will be learning the working of Ajax

Real time examples of AJAX

Gmail Inbox : When a person clicks on the inbox menu then only the part of mail list gets updated without loading the complete page. It can be considered as application of the AJAX.

new-gmail-inbox

Google Suggest : If user types a character in the search box then the AJAX call will be triggered to server and it will show suggestions to user. You can see live example of Ajax here.
Ajax Google suggest - AJAX introduction

For more info : Wikipedia

Synchronous Vs Asynchronous

  1. We can consider JavaScript as a single-threaded language.
  2. When we invoke any complex process containing lot of operations then execution takes more time.
  3. In this case execution will take more time and all the UI elements becomes unresponsive.
  4. Problem can be solved using AJAX to prevent blockage of the UI elements.

Window tutorial will provide more information related to asynchronous application and some of the problems related to asynchronous scripting. [Here]