SlideShare uma empresa Scribd logo
1 de 8
AJAX
• Asynchronous JavaScript And XML

• AJAX is based on JavaScript and HTTP requests.
HISTORY
•   1995 – Java Applets
•   1996 – MS IE5 IFrame
•   1999/2000 – MS IE5 XMLHTTP ActiveX Control
•   By 2004 – Other browsers - XMLHttpRequest object
•   2005 – Google made it popular through google suggest,
    gmail and other apps
• 2006 – W3C released the first draft specification
Technologies
• HTML and CSS for marking up and styling information.
• The DOM accessed with JavaScript.
• The XMLHttpRequest (XHR) object is usually used for
  exchanging data asynchronously between browser and
  server.
• Common data exchange formats include XML, pre-
  formatted HTML, plain text, and JSON.
Advantages
• Page reload avoided to display same common content
  every time.
• The use of asynchronous requests allows the client's
  Web browser UI to be more interactive and to respond
  quickly to inputs.
• Reduce connections to the server.
• State can be maintained throughout a web site.
Disadvantages
• Browser's "back" button issue.
• Difficult for a user to bookmark a particular state of the
  application.
• Web crawlers do not execute JavaScript code, making it
  difficult to index public pages.
• Browser that do not support Ajax or JavaScript, or simply
  have JavaScript disabled.
• The Same origin policy prevents some Ajax techniques
  from being used across domains.
• Testing for malicious attacks and debugging difficult.
XMLHttpRequest (XHR)
• The open method
   – (type, url, async, user, password)
• The setRequestHeader method
   – Content-Type, User-Agent, etc
• The send method
   – Parameter content to be sent
• The onreadystatechange event listener
   – readyState (1 for open, 2 for send, 3 for loading, 4 for complete)
• The HTTP response
   – responseXML, responseText
Browser Object Model
Ajax Libraries
•   JQuery
•   ExtJs
•   Dojo
•   Prototype
•   GWT

Mais conteúdo relacionado

Mais procurados

NOSQL Databases for the .NET Developer
NOSQL Databases for the .NET DeveloperNOSQL Databases for the .NET Developer
NOSQL Databases for the .NET Developer
Jesus Rodriguez
 

Mais procurados (20)

MongoDB SF Python
MongoDB SF PythonMongoDB SF Python
MongoDB SF Python
 
Html
HtmlHtml
Html
 
Taming 3rd party content
Taming 3rd party contentTaming 3rd party content
Taming 3rd party content
 
NOSQL Databases for the .NET Developer
NOSQL Databases for the .NET DeveloperNOSQL Databases for the .NET Developer
NOSQL Databases for the .NET Developer
 
Session 32 - Session Management using Cookies
Session 32 - Session Management using CookiesSession 32 - Session Management using Cookies
Session 32 - Session Management using Cookies
 
Ajax
AjaxAjax
Ajax
 
Web server
Web serverWeb server
Web server
 
Group meeting: Polaris - Faster Page Loads Using Fine-grained Dependency Trac...
Group meeting: Polaris - Faster Page Loads Using Fine-grained Dependency Trac...Group meeting: Polaris - Faster Page Loads Using Fine-grained Dependency Trac...
Group meeting: Polaris - Faster Page Loads Using Fine-grained Dependency Trac...
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
MongoDB London PHP
MongoDB London PHPMongoDB London PHP
MongoDB London PHP
 
Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5
 
Women Who Code, Ground Floor
Women Who Code, Ground FloorWomen Who Code, Ground Floor
Women Who Code, Ground Floor
 
Drupal - What is it?
Drupal - What is it?Drupal - What is it?
Drupal - What is it?
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
Writing Space and the Cassandra NoSQL DBMS
Writing Space and the Cassandra NoSQL DBMSWriting Space and the Cassandra NoSQL DBMS
Writing Space and the Cassandra NoSQL DBMS
 
Ajax workshop
Ajax workshopAjax workshop
Ajax workshop
 
Part One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN StackPart One: Building Web Apps with the MERN Stack
Part One: Building Web Apps with the MERN Stack
 
MongoDB - Getting Started
MongoDB  - Getting StartedMongoDB  - Getting Started
MongoDB - Getting Started
 
Website/Web Applications / Static vs Dynamic Website / Web Browser /
Website/Web Applications  / Static vs Dynamic Website / Web Browser / Website/Web Applications  / Static vs Dynamic Website / Web Browser /
Website/Web Applications / Static vs Dynamic Website / Web Browser /
 
Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentation
 

Semelhante a Ajax introduction

AJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptxAJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptx
Jobin86
 
End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) Europe
Alexandre Morgaut
 

Semelhante a Ajax introduction (20)

Ajax
AjaxAjax
Ajax
 
VFP & Ajax
VFP & AjaxVFP & Ajax
VFP & Ajax
 
End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012End-to-end W3C APIs - tpac 2012
End-to-end W3C APIs - tpac 2012
 
Introduction to AJAX
Introduction to AJAXIntroduction to AJAX
Introduction to AJAX
 
WEB TECHNOLOGY Unit-5.pptx
WEB TECHNOLOGY Unit-5.pptxWEB TECHNOLOGY Unit-5.pptx
WEB TECHNOLOGY Unit-5.pptx
 
AJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptxAJAX Introduction [Autosaved].pptx
AJAX Introduction [Autosaved].pptx
 
PHP - Introduction to PHP AJAX
PHP -  Introduction to PHP AJAXPHP -  Introduction to PHP AJAX
PHP - Introduction to PHP AJAX
 
End to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) EuropeEnd to-end W3C - JS.everywhere(2012) Europe
End to-end W3C - JS.everywhere(2012) Europe
 
Ajax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web ApplicationsAjax:From Desktop Applications towards Ajax Web Applications
Ajax:From Desktop Applications towards Ajax Web Applications
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
 
Evolution of java script libraries
Evolution of java script librariesEvolution of java script libraries
Evolution of java script libraries
 
Asynchronous javascript and xml
Asynchronous javascript and xmlAsynchronous javascript and xml
Asynchronous javascript and xml
 
Ajax
AjaxAjax
Ajax
 
Project First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be usedProject First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be used
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
ITI006En-AJAX
ITI006En-AJAXITI006En-AJAX
ITI006En-AJAX
 
AJAX.pptx
AJAX.pptxAJAX.pptx
AJAX.pptx
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Ajax introduction

  • 1. AJAX • Asynchronous JavaScript And XML • AJAX is based on JavaScript and HTTP requests.
  • 2. HISTORY • 1995 – Java Applets • 1996 – MS IE5 IFrame • 1999/2000 – MS IE5 XMLHTTP ActiveX Control • By 2004 – Other browsers - XMLHttpRequest object • 2005 – Google made it popular through google suggest, gmail and other apps • 2006 – W3C released the first draft specification
  • 3. Technologies • HTML and CSS for marking up and styling information. • The DOM accessed with JavaScript. • The XMLHttpRequest (XHR) object is usually used for exchanging data asynchronously between browser and server. • Common data exchange formats include XML, pre- formatted HTML, plain text, and JSON.
  • 4. Advantages • Page reload avoided to display same common content every time. • The use of asynchronous requests allows the client's Web browser UI to be more interactive and to respond quickly to inputs. • Reduce connections to the server. • State can be maintained throughout a web site.
  • 5. Disadvantages • Browser's "back" button issue. • Difficult for a user to bookmark a particular state of the application. • Web crawlers do not execute JavaScript code, making it difficult to index public pages. • Browser that do not support Ajax or JavaScript, or simply have JavaScript disabled. • The Same origin policy prevents some Ajax techniques from being used across domains. • Testing for malicious attacks and debugging difficult.
  • 6. XMLHttpRequest (XHR) • The open method – (type, url, async, user, password) • The setRequestHeader method – Content-Type, User-Agent, etc • The send method – Parameter content to be sent • The onreadystatechange event listener – readyState (1 for open, 2 for send, 3 for loading, 4 for complete) • The HTTP response – responseXML, responseText
  • 8. Ajax Libraries • JQuery • ExtJs • Dojo • Prototype • GWT