Total members 11889 |It is currently Fri Mar 29, 2024 6:18 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





What is Ajax?

Asynchronous JavaScript and XML or Ajax for short is new web development technique used for the development of most interactive website. Ajax helps you in making your web application more interactive by retrieving small amount of data from web server and then showing it on your application. You can do all these things without refreshing your page.

Usually in all the web applications, the user enters the data into the form and then clicks on the submit button to submit the request to the server. Server processes the request and returns the view in new page ( by reloading the whole page). This process is inefficient, time consuming, and a little frustrating for you user if the only the small amount of data exchange is required. For example in an user registration form, this can be frustrating thing for the user, as whole page is reloaded only to check the availability of the user name. Ajax will help in making your application more interactive. With the help of Ajax you can tune your application to check the availability of the user name without refreshing the whole page.

Understanding the technology behind Ajax

Ajax is not a single technology, but it is a combination of many technologies. These technologies are supported by modern web browsers. Following are techniques used in the Ajax applications.
  • JavaScript:
    JavaScript is used to make a request to the web server. Once the response is returned by the webserver, more JavaScript can be used to update the current page. DHTML and CSS is used to show the output to the user. JavaScript is used very heavily to provide teh dynamic behavior to the application.

  • Asynchronous Call to the Server:
    Most of the Ajax application used the XMLHttpRequest object to send the request to the web server. These calls are Asynchronous and there is no need to wait for the response to come back. User can do the normal work without any problem.

  • XML:
    XML may be used to receive the data returned from the web server. JavaScript can be used to process the XML data returned from the web server easily.
How Ajax Works?

When user first visits the page, the Ajax engine is initialized and loaded. From that point of time user interacts with Ajax engine to interact with the web server. The Ajax engine operates asynchronously while sending the request to the server and receiving the response from server. Ajax life cycle within the web browser can be divided into following stages:
  • User Visit to the page: User visits the URL by typing URL in browser or clicking a link from some other page.

  • Initialization of Ajax engine:
    When the page is initially loaded, the Ajax engine is also initialized. The Ajax engine can also be set to continuously refresh the page content without refreshing the whole page.

  • Event Processing Loop:
    • Browser event may instruct the Ajax engine to send request to server and receive the response data
    • Server response - Ajax engine receives the response from the server. Then it calls the JavaScript call back functions
    • Browser (View) update - JavaScript request call back functions is used to update the browser. DHTML and css is used to update the browser display.

Benefits of Ajax

Ajax is new very promising technology, which has become extremely popular these days. Here are the benefits of using Ajax:
  • Ajax can be used for creating rich, web-based applications that look and works like a desktop application

  • Ajax is easy to learn. Ajax is based on JavaScript and existing technologies like XML, CSS, DHTML. etc. So, its very easy to learn Ajax

  • Ajax can be used to develop web applications that can update the page data continuously without refreshing the whole page




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

This is kind of a dumb question to ask, but what is the URL to the ajax site?


Author:
Newbie
User avatar Posts: 4
Have thanks: 0 time

Sorry but what you mean :D

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

msi_333 wrote:
Sorry but what you mean :D

like... you said that we have to open a URL right? Or is it a download?


Author:
Newbie
User avatar Posts: 4
Have thanks: 0 time

no i didn't say that ,Where ?? . :D ... :D

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

This topic is an introduction to ajax technology , it just give you the meaning of AJAX !.

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

msi_333 wrote:
How Ajax Works?

When user first visits the page, the Ajax engine is initialized and loaded. From that point of time user interacts with Ajax engine to interact with the web server. The Ajax engine operates asynchronously while sending the request to the server and receiving the response from server. Ajax life cycle within the web browser can be divided into following stages:

* User Visit to the page: User visits the URL by typing URL in browser or clicking a link from some other page.

* Initialization of Ajax engine:
When the page is initially loaded, the Ajax engine is also initialized. The Ajax engine can also be set to continuously refresh the page content without refreshing the whole page.

* Event Processing Loop:
* Browser event may instruct the Ajax engine to send request to server and receive the response data
* Server response - Ajax engine receives the response from the server. Then it calls the JavaScript call back functions
* Browser (View) update - JavaScript request call back functions is used to update the browser. DHTML and css is used to update the browser display.


... yeah. In that, you said to open a URL (?)


Author:
Newbie
User avatar Posts: 4
Have thanks: 0 time

oh... sorry.


Author:
Newbie
User avatar Posts: 4
Have thanks: 0 time

updated.

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 9 posts ] 

  Related Posts  to : What is AJAX, How to start AJAX?
 AJAX WITH JSP     -  
 need help in ajax     -  
 using ajax with asp     -  
 need help in ajax     -  
 Ajax without javascript     -  
 How asynchronous is AJAX     -  
 login using Ajax     -  
 My First Ajax application     -  
 Validation using Ajax     -  
 pre caching using ajax     -  



Topic Tags

AJAX Basics






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com