Monday, 21 October 2013

Introduction to Ajax


AJAX is not a technology but it is a group of technologies (as Javascript, CSS, XHTML, DOM etc). We can also say it is a combination of client side technologies that provides asynchronous communication b\w user interface and web server so that partial page rendering occurs instead of complete page post back. It is platform independent means AJAX is a cross platform technology that can be used an any Operating system since it is based an XML & Javascript. It also supports open source implementation of other technology. It partially render the page to the server instead of complete page postback.We use AJAX for developing faster better and more interactive web applications.AJAX use HTTP request b\w web server & browser.

Ajax Features

1.     Ajax minimize round trips to the server.
2.     It is language independent means we can use ajax in every language
3.     Ajax is platform independent.
4.     Rendering of webpage is faster.
5.     Reduce consumption of server resources.

Ajax Drawback

Response Time in AJAX based development we should care of response time b\w client & server because it gets normally delayed. AJAX is based on Java Script and different browser implement Javascript different way. Hence here may be a problems on different browser.
Example :Uploading of file in gmail & do working in message body box.

Script Manager

It manages all ASP.Net AJAX controls on the web page. It renders the AJAX library to the browser and supports partial page rendering. It also manage partial page uploades and provide access to web service method. Without script manager we can't use AJAX controls on the web page.
 
What is ajax
·         AJAX is Asynchronous JavaScript And XML.
·         The XmlHttpRequest is an actual object which works behind the scene.
·         Ajax implementation uses JavaScript functions to call methods from a webservice, webpage request in response to get response.
·         Response data is parsed using DOM.
·         Asynchronous data retrieval using XmlHttpRequest
 
 
Advantages of ajax
 
·         Reduce the traffic travels between the client and the server.
·         Response time is faster so increases performance and speed.
·         You can use JSON (JavaScript Object Notation) which is alternative to XML. JSON is key value pair and works like an array.
·         You can use Firefox browser with an add-on called as Firebug to debug all Ajax calls.
·         Ready Open source JavaScript libraries available for use – JQuery, Prototype, Scriptaculous, etc..
·         AJAX communicates over HTTP Protocol.
 
Disadvantages of ajax
 
·         It can increase design and development time
·         More complex than building classic web application
·         Security is less in AJAX application as all files are downloaded at client side.
·         Search Engine like Google cannot index AJAX pages.
·         JavaScript disabled browsers cannot use the application.

·         Due to security constraints, you can only use it to access information from the host that served the initial page. If you need to display information from another server, it is not possible within the AJAX.

No comments:

Post a Comment