25.12.2013 Views

CRANFIELD UNIVERSITY Eleni Anthippi Chatzimichali ...

CRANFIELD UNIVERSITY Eleni Anthippi Chatzimichali ...

CRANFIELD UNIVERSITY Eleni Anthippi Chatzimichali ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1. DOM for providing dynamic display and interaction<br />

2. CSS and XHTML for carrying out standardised-format presentation<br />

3. XML and XSTL for carrying out data exchange and processing<br />

4. The XMLHttpRequest object for asynchronous data retrieving and handling<br />

5. JavaScript for data processing and binding all the technologies together<br />

The adoption of AJAX has drastically enhanced interactive functionality in websites<br />

due its asynchronous nature. The classic web application model makes use of<br />

synchronous interactions in a request-wait-response client-server model. In this<br />

process, as illustrated in Figure 6-5, the client (user) triggers initially an HTTP<br />

request to the web server through a web interface. Subsequently, the server analyses<br />

the request sent by the client, and carries out any processing tasks such as retrieving<br />

data, among many others. Due to the synchronous nature of the model, the client has<br />

to unnecessarily wait while the server processes the submitted data. For every<br />

requested task, the application is locked up and the waiting time increases<br />

exponentially. In most cases, the browser displays blank pages while processing the<br />

data and the users must wait until the entire HTML page is reloaded. Finally, the<br />

server returns a response along with the requested results back to the user. This model<br />

is adapted from the Web’s original use as a hypertext medium, but it is not found fit<br />

for software applications since it makes a lot of technical sense, but does not make for<br />

a great user experience.<br />

AJAX on the other hand, which is based on asynchronous interactions, follows a<br />

completely different approach when compared to the classic web application model,<br />

as presented in Figure 6-5. AJAX allows the users to continue interacting with the<br />

web interface without any interruptions or page reloads, while simultaneously,<br />

messages are exchanged with the web server in the background. The<br />

XMLHttpRequest object, which constitutes the backbone of the AJAX<br />

methodology, uses a request-response model that supports the indiscernible exchange<br />

of data between client and server in the background. Therefore, the users avoid<br />

communicating directly with the server by stimulating an HTTP request as in the case<br />

of the classic model. On the contrary, due to the asynchronous nature of this<br />

methodology, the displayed contents of the browser can never be scintillated, delayed<br />

179

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!