SlideShare una empresa de Scribd logo
1 de 13
AJAX Bharath. P                                             Information Science dept. Sapthagiri college of engineering
What is AJAX? Overview History How it works? Request phase implementation Response phase implementation Examples of Request and Response phase Advantages and Disadvantages Agenda
Asynchronous Javascript and XML. It is a client-side technology that combines a set of known technologies in order to create faster and more user friendly web pages. It provides responsiveness approaching to that of desktop applications. What is AJAX?
AJAX is meant to speed web apps that have frequent user interactions. Technologies used mainly are javascirpt, xml, DOM, css… It shortens the required time for both document transmission and document rendering. When browser requests a new part of its displayed document from the server, it doesn’t lock up waiting for response, thus its Asynchronous. Overview
Use of <iframe> element which is made invisible by setting width and height to zero, although this worked, it was not elegant. Microsoft introduced 2 extensions to DOM with XmlDocument and XmlHtml (XmlHttpRequest) objects. It got popular from 2005/06 with google maps and gmail popularizing it. History
How it works?
Object declaration of type XmlHttpRequest. Registering function that implements the receive phase of the application using onreadystatechange property. Call to open method to set parameters (Http method, URL of response document on the server, Asynchronous or synchronous) for HttpRequest. Call to send method to send the HttpRequest to server. Request phase implementation
Check value of callback from server to see whether processing of request is completed. Get the response using responsetext property of XmlHttprequest object. Display the output in a desired way. Response phase implementation
Varxhr= new XmlHttpRequest(); xhr.onreadystatechange= response; xhr.open(“GET”, “reply.php?....”,true); xhr.send(null); Example of Request phase
Function response()   {   if(xhr.readystate == 4) { var result=xhr.responsetext;   // any desired code   } Example of Response phase
Independent of server technology. Apart from obtaining the XMLHTTP object, all processing is same for all browser types, because Javascript is used. Permits the development of faster and more interactive desktop like interface to users. Advantages
The back button problem. People think that when they press back button, they will return to the last change they made, but in AJAX this does not hold. Requests ActiveX to be enabled in IE 5 and 6Is only available in newer versions of Opera, firefox and Safari Has small implementation differences between browsers Disadvantages
Thank you

Más contenido relacionado

La actualidad más candente (20)

Ajax Presentation
Ajax PresentationAjax Presentation
Ajax Presentation
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
M6 l8-ajax-handout
M6 l8-ajax-handoutM6 l8-ajax-handout
M6 l8-ajax-handout
 
AJAX
AJAXAJAX
AJAX
 
Ajax
AjaxAjax
Ajax
 
Pracitcal AJAX
Pracitcal AJAXPracitcal AJAX
Pracitcal AJAX
 
Ajax
Ajax Ajax
Ajax
 
Net core performance
Net core performanceNet core performance
Net core performance
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Simple todo app with meteor
Simple todo app with meteorSimple todo app with meteor
Simple todo app with meteor
 
Ajax
AjaxAjax
Ajax
 
Grails Controllers
Grails ControllersGrails Controllers
Grails Controllers
 
Spring batch
Spring batchSpring batch
Spring batch
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Metrics by coda hale : to know your app’ health
Metrics by coda hale : to know your app’ healthMetrics by coda hale : to know your app’ health
Metrics by coda hale : to know your app’ health
 
Grokking TechTalk #24: Thiết kế hệ thống Background Job Queue bằng Ruby & Pos...
Grokking TechTalk #24: Thiết kế hệ thống Background Job Queue bằng Ruby & Pos...Grokking TechTalk #24: Thiết kế hệ thống Background Job Queue bằng Ruby & Pos...
Grokking TechTalk #24: Thiết kế hệ thống Background Job Queue bằng Ruby & Pos...
 
Ajax
AjaxAjax
Ajax
 
ASP.NET Lecture 7
ASP.NET Lecture 7ASP.NET Lecture 7
ASP.NET Lecture 7
 

Destacado

Artificial inteligence
Artificial inteligenceArtificial inteligence
Artificial inteligenceSn Kariarikato
 
Freeport: press trip
Freeport: press tripFreeport: press trip
Freeport: press tripPR.Konektor
 
Case study: Český šermířský svaz
Case study: Český šermířský svazCase study: Český šermířský svaz
Case study: Český šermířský svazPR.Konektor
 
Jak sociální média změnila povahu PR
Jak sociální média změnila povahu PRJak sociální média změnila povahu PR
Jak sociální média změnila povahu PRPR.Konektor
 
Case study: digitální PR pro Vincentku
Case study: digitální PR pro VincentkuCase study: digitální PR pro Vincentku
Case study: digitální PR pro VincentkuPR.Konektor
 
Case study: sčítání fanoušků (El Clásico)
Case study: sčítání fanoušků (El Clásico)Case study: sčítání fanoušků (El Clásico)
Case study: sčítání fanoušků (El Clásico)PR.Konektor
 
Case study: PR launch ZUNO bank
Case study: PR launch ZUNO bankCase study: PR launch ZUNO bank
Case study: PR launch ZUNO bankPR.Konektor
 
Case study: Garnier Olia Competition
Case study: Garnier Olia CompetitionCase study: Garnier Olia Competition
Case study: Garnier Olia CompetitionPR.Konektor
 
PENNY: Zákaznický Senát
PENNY: Zákaznický SenátPENNY: Zákaznický Senát
PENNY: Zákaznický SenátPR.Konektor
 
Artificial Intelligence(AI)
Artificial Intelligence(AI)Artificial Intelligence(AI)
Artificial Intelligence(AI)Hari krishnan
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logicgiki67
 

Destacado (13)

Artificial inteligence
Artificial inteligenceArtificial inteligence
Artificial inteligence
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Freeport: press trip
Freeport: press tripFreeport: press trip
Freeport: press trip
 
Case study: Český šermířský svaz
Case study: Český šermířský svazCase study: Český šermířský svaz
Case study: Český šermířský svaz
 
Jak sociální média změnila povahu PR
Jak sociální média změnila povahu PRJak sociální média změnila povahu PR
Jak sociální média změnila povahu PR
 
Case study: digitální PR pro Vincentku
Case study: digitální PR pro VincentkuCase study: digitální PR pro Vincentku
Case study: digitální PR pro Vincentku
 
Case study: sčítání fanoušků (El Clásico)
Case study: sčítání fanoušků (El Clásico)Case study: sčítání fanoušků (El Clásico)
Case study: sčítání fanoušků (El Clásico)
 
Case study: PR launch ZUNO bank
Case study: PR launch ZUNO bankCase study: PR launch ZUNO bank
Case study: PR launch ZUNO bank
 
Case study: Garnier Olia Competition
Case study: Garnier Olia CompetitionCase study: Garnier Olia Competition
Case study: Garnier Olia Competition
 
PENNY: Zákaznický Senát
PENNY: Zákaznický SenátPENNY: Zákaznický Senát
PENNY: Zákaznický Senát
 
Laird ibm-small
Laird ibm-smallLaird ibm-small
Laird ibm-small
 
Artificial Intelligence(AI)
Artificial Intelligence(AI)Artificial Intelligence(AI)
Artificial Intelligence(AI)
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 

Similar a Ajax (20)

Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Ajax Lecture Notes
Ajax Lecture NotesAjax Lecture Notes
Ajax Lecture Notes
 
Copy of ajax tutorial
Copy of ajax tutorialCopy of ajax tutorial
Copy of ajax tutorial
 
Ajax Introduction
Ajax IntroductionAjax Introduction
Ajax Introduction
 
Unit-5.pptx
Unit-5.pptxUnit-5.pptx
Unit-5.pptx
 
Ajax
AjaxAjax
Ajax
 
M Ramya
M RamyaM Ramya
M Ramya
 
Using Ajax In Domino Web Applications
Using Ajax In Domino Web ApplicationsUsing Ajax In Domino Web Applications
Using Ajax In Domino Web Applications
 
Ajax
AjaxAjax
Ajax
 
SynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client librarySynapseIndia dotnet development ajax client library
SynapseIndia dotnet development ajax client library
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
Ajax
AjaxAjax
Ajax
 
Ajax Introduction
Ajax IntroductionAjax Introduction
Ajax Introduction
 
Ajax tutorial by bally chohan
Ajax tutorial by bally chohanAjax tutorial by bally chohan
Ajax tutorial by bally chohan
 
Building Applications Using Ajax
Building Applications Using AjaxBuilding Applications Using Ajax
Building Applications Using Ajax
 
AJAX
AJAXAJAX
AJAX
 
AJAX
AJAXAJAX
AJAX
 
Mashup
MashupMashup
Mashup
 
mukesh
mukeshmukesh
mukesh
 

Último

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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 organizationRadu Cotescu
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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 2024Rafal Los
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Último (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Ajax

  • 1. AJAX Bharath. P Information Science dept. Sapthagiri college of engineering
  • 2. What is AJAX? Overview History How it works? Request phase implementation Response phase implementation Examples of Request and Response phase Advantages and Disadvantages Agenda
  • 3. Asynchronous Javascript and XML. It is a client-side technology that combines a set of known technologies in order to create faster and more user friendly web pages. It provides responsiveness approaching to that of desktop applications. What is AJAX?
  • 4. AJAX is meant to speed web apps that have frequent user interactions. Technologies used mainly are javascirpt, xml, DOM, css… It shortens the required time for both document transmission and document rendering. When browser requests a new part of its displayed document from the server, it doesn’t lock up waiting for response, thus its Asynchronous. Overview
  • 5. Use of <iframe> element which is made invisible by setting width and height to zero, although this worked, it was not elegant. Microsoft introduced 2 extensions to DOM with XmlDocument and XmlHtml (XmlHttpRequest) objects. It got popular from 2005/06 with google maps and gmail popularizing it. History
  • 7. Object declaration of type XmlHttpRequest. Registering function that implements the receive phase of the application using onreadystatechange property. Call to open method to set parameters (Http method, URL of response document on the server, Asynchronous or synchronous) for HttpRequest. Call to send method to send the HttpRequest to server. Request phase implementation
  • 8. Check value of callback from server to see whether processing of request is completed. Get the response using responsetext property of XmlHttprequest object. Display the output in a desired way. Response phase implementation
  • 9. Varxhr= new XmlHttpRequest(); xhr.onreadystatechange= response; xhr.open(“GET”, “reply.php?....”,true); xhr.send(null); Example of Request phase
  • 10. Function response() { if(xhr.readystate == 4) { var result=xhr.responsetext; // any desired code } Example of Response phase
  • 11. Independent of server technology. Apart from obtaining the XMLHTTP object, all processing is same for all browser types, because Javascript is used. Permits the development of faster and more interactive desktop like interface to users. Advantages
  • 12. The back button problem. People think that when they press back button, they will return to the last change they made, but in AJAX this does not hold. Requests ActiveX to be enabled in IE 5 and 6Is only available in newer versions of Opera, firefox and Safari Has small implementation differences between browsers Disadvantages