Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. AJAX Basics
  2. 2. History of AJAX Starts with web pages Static web pages Static html page is loaded No interaction with user Dynamic web pages html page is generated dynamically Interaction with user Becomes slower as functionality increases Speed becomes untolerable, so AJAX has been born
  3. 3. What is AJAX? Asynchronous JavaScript and XML (AJAX). Not a stand-alone language or technology. Combines a set of known technologies in order to create faster andmore user friendly web pages. Client side technology. Makes web pages more responsive by exchanging small amounts ofdata. Allows the web page to change its content without refreshing thewhole page. Web browser technology independent of web server software.
  4. 4. What is So Cool about AJAX? Connection between client side script and server side script. Better user experience. More flexibility. More options.
  5. 5. AJAX Technologies Extensible Markup Language (XML) Hyper Text Markup Language (HTML) JavaScript Cascading Style Sheet (CSS) ASP or JSP (server side)
  6. 6. AJAX ExamplesGoogle MapsUser can drag the entire map by using the mouse instead of clicking on abutton or somethingGoogle SuggestGoogle will offer suggestions.GmailGmail is a new kind of webmail, built on the idea that email can be moreintuitive, efficient and usefulYahoo Maps (new)Now its even easier and more fun to get where youre going!
  7. 7. Why it is Popular? Google helped popularize, and legitimize it in Gmail. Increase Usability of Web Applications. Rich Internet applications without Flash. Save Bandwidth. Download only data you need. Faster interfaces.
  8. 8. Advantages of AJAX Better internet Application Requests only the content that needs to be updated Respond quickly to the input Page can be reloaded individually Reduces connections to the serverPrevents unnecessary reloading of a page
  9. 9. AJAX Browser SupportInternet Explorer OperaMozilla Firefox Flock Safari Netscape
  10. 10. How AJAX Works? AJAX is based on Javascript, and the main functionality is to accessthe web server inside the Javascript code. We access to the server using special objects; we send data andretrieve data. When user initiates an event, a javascript function is called whichaccesses server using the objects. The received information is shown to the user by means of theJavascript’s functions.
  11. 11. Working….. The client process the returned xml document using JavaScriptUsing JavaScript, an and updates the page contentinstance of the xmlHttprequest is then sent Internet The Http Request is processed by the server. A response is created And returned as xml data to the client
  12. 12. Working cont…..XMLHTTPRequest ObjectHeart of the AJAX Engine and it is responsible to carry the HTTP requestto the server asynchronously.Talking with the ServerXMLHTTPRequest talks with the server with its appropriate methods andproperties asynchronously at the backside.Server ResponseAs per the Server script is concerned the request from the XMLHTTPRequest isjust another HTTP request.Dealing with the Server ResponseOnce after the AJAX Engine gets notified about the successful execution.It modifies the data according to the functionality and keeps in place.
  13. 13. AJAX ServerAJAX is about creating clever applications that can use the data.Requesting Text FilesMany AJAX applications requests pure text files to retrieve data forthe application.Requesting XML FilesA very common AJAX method is to request XML files to retrieveapplication data.
  14. 14. Requesting ASP or PHP FilesRequesting an ASP or PHP file is the most common way to accessdatabase information.Requesting HTML FilesRequesting HTML files is a common method for filling out differentinformation on a web page.Submitting FormsWith AJAX you can easily submit form data without having to reload thepage.
  15. 15. Ajax FrameworksFramework Framework ExampleJavaScript Yahoo User Interface Library (YUI)Java Google Web Toolkit.NET ASP.NET AJAXPHP SajaxPython Pyjamas
  16. 16. Ajax SecurityServer SideAJAX-based Web applications use the same server side securityschemes of regular Web applications.Client Side Downloaded JavaScript code is constrained by sand-box security model and can be relaxed for signed JavaScript.
  17. 17. Issues with Ajax Complexity is increased AJAX-based applications can be difficult to debug, test, and maintain Toolkits/Frameworks are not mature yet No standardization of the XMLHttpRequest yet No support of XMLHttpRequest in old browsers JavaScript technology dependency & incompatibility JavaScript code is visible to a hacker
  18. 18. Thank You
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.