SlideShare a Scribd company logo
AJAX Basics
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
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 and
more user friendly web pages.

 Client side technology.

 Makes web pages more responsive by exchanging small amounts of
data.

 Allows the web page to change its content without refreshing the
whole page.

 Web browser technology independent of web server software.
What is So Cool about AJAX?




 Connection between client side script and server side script.

 Better user experience.

 More flexibility.

 More options.
AJAX Technologies




 Extensible Markup Language (XML)

 Hyper Text Markup Language (HTML)

 JavaScript

 Cascading Style Sheet (CSS)

 ASP or JSP (server side)
AJAX Examples

Google Maps

User can drag the entire map by using the mouse instead of clicking on a
button or something

Google Suggest

Google will offer suggestions.

Gmail

Gmail is a new kind of webmail, built on the idea that email can be more
intuitive, efficient and useful

Yahoo Maps (new)

Now it's even easier and more fun to get where you're going!
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.
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
AJAX Browser Support




Internet Explorer            Opera




Mozilla Firefox              Flock




  Safari                     Netscape
How AJAX Works?



 AJAX is based on Javascript, and the main functionality is to access
the web server inside the Javascript code.

 We access to the server using special objects; we send data and
retrieve data.

 When user initiates an event, a javascript function is called which
accesses server using the objects.

 The received information is shown to the user by means of the
Javascript’s functions.
Working…..




                                                              The client process the returned
                                                              xml document using JavaScript
Using JavaScript, an                                          and updates the page content
instance of the xmlHttp
request is then sent
                                     Internet




                          The Http Request is processed by
                          the server. A response is created
                          And returned as xml data to the
                          client
Working cont…..

XMLHTTPRequest Object

Heart of the AJAX Engine and it is responsible to carry the HTTP request
to the server asynchronously.

Talking with the Server

XMLHTTPRequest talks with the server with its appropriate methods and
properties asynchronously at the backside.

Server Response

As per the Server script is concerned the request from the XMLHTTPRequest is
just another HTTP request.

Dealing with the Server Response

Once after the AJAX Engine gets notified about the successful execution.
It modifies the data according to the functionality and keeps in place.
AJAX Server



AJAX is about creating clever applications that can use the data.

Requesting Text Files

Many AJAX applications requests pure text files to retrieve data for
the application.

Requesting XML Files

A very common AJAX method is to request XML files to retrieve
application data.
Requesting ASP or PHP Files

Requesting an ASP or PHP file is the most common way to access
database information.

Requesting HTML Files

Requesting HTML files is a common method for filling out different
information on a web page.

Submitting Forms

With AJAX you can easily submit form data without having to reload the
page.
Ajax Frameworks




Framework    Framework Example
JavaScript   Yahoo User Interface Library (YUI)
Java         Google Web Toolkit
.NET         ASP.NET AJAX
PHP          Sajax
Python       Pyjamas
Ajax Security


Server Side

AJAX-based Web applications use the same server side security
schemes of regular Web applications.


Client Side

 Downloaded JavaScript code is constrained by sand-box security
 model and can be relaxed for signed JavaScript.
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
Thank You

More Related Content

PPT
Ajax Presentation
PPT
Advantages and disadvantages of an ajax based client application
PPTX
Introduction to ajax
DOCX
Jquery Ajax
PPT
Ajax Ppt 1
PPT
Using Ajax In Domino Web Applications
Ajax Presentation
Advantages and disadvantages of an ajax based client application
Introduction to ajax
Jquery Ajax
Ajax Ppt 1
Using Ajax In Domino Web Applications

What's hot (20)

PPTX
Architecture in Ajax Applications
PPT
Inner core of Ajax
PPTX
Overview of AJAX
PPT
Asynchronous JavaScript & XML (AJAX)
PPT
Ajax workshop
PPTX
Ajax
PPT
Ajax and PHP
PPT
Ajax presentation
PPT
Introduction to ajax
PPTX
Ajax:From Desktop Applications towards Ajax Web Applications
PPT
Ajax Presentation
PPTX
Introduction about-ajax-framework
PPT
PDF
Introduction to ajax
PPT
An Introduction to Ajax Programming
PPSX
Ajax part i
PPT
PPTX
Introduction to ajax
Architecture in Ajax Applications
Inner core of Ajax
Overview of AJAX
Asynchronous JavaScript & XML (AJAX)
Ajax workshop
Ajax
Ajax and PHP
Ajax presentation
Introduction to ajax
Ajax:From Desktop Applications towards Ajax Web Applications
Ajax Presentation
Introduction about-ajax-framework
Introduction to ajax
An Introduction to Ajax Programming
Ajax part i
Introduction to ajax
Ad

Viewers also liked (6)

PDF
Xml
PDF
Json
PDF
Dom
PPT
Ajax Patterns : Periodic Refresh & Multi Stage Download
PDF
Introduction to xml
PDF
The Presentation Come-Back Kid
Xml
Json
Dom
Ajax Patterns : Periodic Refresh & Multi Stage Download
Introduction to xml
The Presentation Come-Back Kid
Ad

Similar to Ajax (20)

PPT
TXT
25250716 seminar-on-ajax text
PPTX
PPTX
AJAX Introduction [Autosaved].pptx
PPTX
AJAX.pptx
PPT
PPT
01 Ajax Intro
PPT
jQuery Ajax
DOCX
Copy of ajax tutorial
PDF
Ajax
PDF
1 ppt-ajax with-j_query
PPTX
WEB TECHNOLOGY Unit-5.pptx
PPT
Web Programming using Asynchronous JavaX
PPTX
HSHDGDGDHDYDUDUDUDHDHDHSHAHAHSHSBDHDHDHDHDHD
25250716 seminar-on-ajax text
AJAX Introduction [Autosaved].pptx
AJAX.pptx
01 Ajax Intro
jQuery Ajax
Copy of ajax tutorial
Ajax
1 ppt-ajax with-j_query
WEB TECHNOLOGY Unit-5.pptx
Web Programming using Asynchronous JavaX
HSHDGDGDHDYDUDUDUDHDHDHSHAHAHSHSBDHDHDHDHDHD

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Tartificialntelligence_presentation.pptx
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
A Presentation on Artificial Intelligence
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Mushroom cultivation and it's methods.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
Encapsulation theory and applications.pdf
Getting Started with Data Integration: FME Form 101
gpt5_lecture_notes_comprehensive_20250812015547.pdf
OMC Textile Division Presentation 2021.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Spectroscopy.pptx food analysis technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Network Security Unit 5.pdf for BCA BBA.
Tartificialntelligence_presentation.pptx
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
TLE Review Electricity (Electricity).pptx
A Presentation on Artificial Intelligence
Programs and apps: productivity, graphics, security and other tools
Mushroom cultivation and it's methods.pdf
A comparative analysis of optical character recognition models for extracting...
Univ-Connecticut-ChatGPT-Presentaion.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
SOPHOS-XG Firewall Administrator PPT.pptx

Ajax

  • 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. 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 and more user friendly web pages.  Client side technology.  Makes web pages more responsive by exchanging small amounts of data.  Allows the web page to change its content without refreshing the whole page.  Web browser technology independent of web server software.
  • 4. What is So Cool about AJAX?  Connection between client side script and server side script.  Better user experience.  More flexibility.  More options.
  • 5. AJAX Technologies  Extensible Markup Language (XML)  Hyper Text Markup Language (HTML)  JavaScript  Cascading Style Sheet (CSS)  ASP or JSP (server side)
  • 6. AJAX Examples Google Maps User can drag the entire map by using the mouse instead of clicking on a button or something Google Suggest Google will offer suggestions. Gmail Gmail is a new kind of webmail, built on the idea that email can be more intuitive, efficient and useful Yahoo Maps (new) Now it's even easier and more fun to get where you're going!
  • 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. 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. AJAX Browser Support Internet Explorer Opera Mozilla Firefox Flock Safari Netscape
  • 10. How AJAX Works?  AJAX is based on Javascript, and the main functionality is to access the web server inside the Javascript code.  We access to the server using special objects; we send data and retrieve data.  When user initiates an event, a javascript function is called which accesses server using the objects.  The received information is shown to the user by means of the Javascript’s functions.
  • 11. Working….. The client process the returned xml document using JavaScript Using JavaScript, an and updates the page content instance of the xmlHttp request 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. Working cont….. XMLHTTPRequest Object Heart of the AJAX Engine and it is responsible to carry the HTTP request to the server asynchronously. Talking with the Server XMLHTTPRequest talks with the server with its appropriate methods and properties asynchronously at the backside. Server Response As per the Server script is concerned the request from the XMLHTTPRequest is just another HTTP request. Dealing with the Server Response Once after the AJAX Engine gets notified about the successful execution. It modifies the data according to the functionality and keeps in place.
  • 13. AJAX Server AJAX is about creating clever applications that can use the data. Requesting Text Files Many AJAX applications requests pure text files to retrieve data for the application. Requesting XML Files A very common AJAX method is to request XML files to retrieve application data.
  • 14. Requesting ASP or PHP Files Requesting an ASP or PHP file is the most common way to access database information. Requesting HTML Files Requesting HTML files is a common method for filling out different information on a web page. Submitting Forms With AJAX you can easily submit form data without having to reload the page.
  • 15. Ajax Frameworks Framework Framework Example JavaScript Yahoo User Interface Library (YUI) Java Google Web Toolkit .NET ASP.NET AJAX PHP Sajax Python Pyjamas
  • 16. Ajax Security Server Side AJAX-based Web applications use the same server side security schemes of regular Web applications. Client Side Downloaded JavaScript code is constrained by sand-box security model and can be relaxed for signed JavaScript.
  • 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