SlideShare a Scribd company logo
A synchronous J avaScript A nd X ML What? Why? How? Who?
Overview Web applications are based on request/response During request process,  nothing  is displayed
Overview Please wait … Request Response Client Server
Overview: Traditional Web App. Life Cycle Request
Process Overview: Traditional Web App. Life Cycle Loading
Response Overview: Traditional Web App. Life Cycle
Overview To improve performance, you either: load everything & display required data (JavaScript) OR keep moving back and forth between client & server An alternative way is to use AJAX .
What? AJAX: Asynchronous JavaScript And XML AJAX uses a  XML  to send and receive  asynchronous  requests/responses and then leverages presentation technologies ( JavaScript , DOM, HTML, and CSS) to process the response.  Most browsers support the necessary technology for AJAX.
AJAX enables you execute a server-side method through a JavaScript call, without requiring a browser refresh. What?
AJAX Web App. Life Cycle Request
Process AJAX Web App. Life Cycle Nothing here
Response AJAX Web App. Life Cycle
Real world example Falafel & Jumaa
Let us start cooking, I am HUNGRY! Ingredients: JavaScript To build client-side functionality (using DOM). XMLHttpRequest object To enable JS to access the server  asynchronously . Server Side Technology To handle the request. The response will be  XML .
How (how to use AJAX)? Modify web.config Register the web page Use  <Ajax.AjaxMethod()>  attribute Write JavaScript to handle the response
How (how to use AJAX)? Do not just tell me, show me a demo!
Who (who use AJAX)? Windows Live Mail ( http:// www.hotmail.com ) Google Goole Mail ( http:// mail.google.com ) Google Maps ( http:// maps.google.com ) Google Suggests ( http://www.google.com/webhp?complete=1&hl=en ) Yahoo! Flickr ( http://www.flickr.com ) Meebo ( http:// www.meebo.com ) …  Who’s next (you???)
Who (who uses AJAX)?
FAQ What data types does AJAX support? AJAX supports: Primitive types of custom classes and arrays integers, strings, double, booleans, DateTime, DataSets and DataTables All other types have their ToString values returned What about  Session s? AJAX supports Session read and write
Why (why to use AJAX)? Faster web actions Less (or no) page refreshes Reduce network traffic Decreased server-side bandwidth usage Web apps that rival (or surpass) installed GUI apps
Why (why  not  to use AJAX)? Bye bye, bookmarks! Search engines may not be able to index all pages. Inaccurate Back & Forward button actions. JavaScript can be easily disabled from client side.
Do not reinvent the wheel,  Many AJAX frameworks are available now: AJAX.Net Abobe  (Spry). Google  (Google Web Toolkit). Microsoft  (Atlas). …  others are coming.
AJAX.Net Server Side Code [AjaxMethod] public DataSet GetDataSet(){ DataSet ds = new DataSet(); ... return ds; }
AJAX.Net Client Side Code function doTest1(){ AJAXDemo. GetDataSet(_callback1); } function _callback1(res){ var cols = res.value.Tables[0].Columns.length; var rows = res.value.Tables[0].Rows.length; alert(cols + &quot; cols and &quot; + rows + &quot; rows&quot;); }
AJAX.Net Dataset ( Creating a client-side DataSet using JS ) var ds = new Ajax.Web.DataSet(); var dt = new Ajax.Web.DataTable(); dt.addColumn(&quot;FirstName&quot;, &quot;System.String&quot;); dt.addColumn(&quot;Age&quot;, &quot;System.Int32&quot;); dt.addRow({&quot;FirstName&quot;:&quot;Michael&quot;,&quot;Age&quot;:28}); dt.addRow({&quot;FirstName&quot;:&quot;Tanja&quot;,&quot;Age&quot;:25}); ds.addTable(dt);
AJAX.Net Dataset ( Creating a client-side DataSet using JS ) dt.addRow({&quot;FirstName&quot;:&quot;Michael&quot;,&quot;Age&quot;:28}); // or using an object var row = new Object(); row.FirstName = &quot;Michael&quot;; row.Age = 28; dt.addRow(row);
One Day AJAX is not the end, one day you will look at this technology and  LAUGH !!!

More Related Content

PPTX
What is Ajax technology?
PPTX
Ajax presentation
PPTX
Ajax
PPT
Node.js Express Framework
PPT
Ajax presentation
PPT
Asynchronous JavaScript & XML (AJAX)
What is Ajax technology?
Ajax presentation
Ajax
Node.js Express Framework
Ajax presentation
Asynchronous JavaScript & XML (AJAX)

What's hot (20)

PDF
Introduction to ajax
PPTX
PPT
PHP - Introduction to PHP AJAX
PPT
Ajax Ppt 1
PPTX
Ajax ppt - 32 slides
PPTX
PPTX
HTTP request and response
PDF
Intro to Asynchronous Javascript
PPTX
Basics of the Web Platform
PPT
jQuery Ajax
PDF
Spring MVC Framework
PPTX
Introduction to ajax
PDF
Rest web services
PPT
Ajax Ppt
PPTX
jQuery
PPT
Web Servers: Architecture and Security
DOCX
Spring notes
PPT
PPTX
Bootstrap 3
Introduction to ajax
PHP - Introduction to PHP AJAX
Ajax Ppt 1
Ajax ppt - 32 slides
HTTP request and response
Intro to Asynchronous Javascript
Basics of the Web Platform
jQuery Ajax
Spring MVC Framework
Introduction to ajax
Rest web services
Ajax Ppt
jQuery
Web Servers: Architecture and Security
Spring notes
Bootstrap 3
Ad

Viewers also liked (18)

PPTX
Ajax for dummies, and not only.
PDF
Ajax Introduction Presentation
PPT
An Introduction to Ajax Programming
PDF
основы Ajax презентация
PPTX
Overview of AJAX
PDF
Ajax - Presente e futuro delle applicazioni web
DOCX
Arpanet
PDF
Corso base di Tecnologie WEB - una visione d'insieme
PPTX
Business consultants what they do and how important are they
DOCX
Deber 1
PDF
youthpass_Jakub2015
PPTX
ESL Update for Principals 12/11/12
PPTX
Arpanet
PPTX
Guerrilla rural del ERP
PDF
MLM Portfolio
PPTX
Introduction to HTML5 Canvas
PPTX
Animación3°2 aracelif
PPT
Arpanet
Ajax for dummies, and not only.
Ajax Introduction Presentation
An Introduction to Ajax Programming
основы Ajax презентация
Overview of AJAX
Ajax - Presente e futuro delle applicazioni web
Arpanet
Corso base di Tecnologie WEB - una visione d'insieme
Business consultants what they do and how important are they
Deber 1
youthpass_Jakub2015
ESL Update for Principals 12/11/12
Arpanet
Guerrilla rural del ERP
MLM Portfolio
Introduction to HTML5 Canvas
Animación3°2 aracelif
Arpanet
Ad

Similar to Ajax Presentation (20)

PPT
Using Ajax In Domino Web Applications
PPT
Ajax ppt
PPT
PPT
Ajax Presentation
PPT
Synapseindia dot net development web applications with ajax
PPT
AJAX
PPT
PPTX
Introduction to ajax
PDF
Ajax
PPT
Ajax
ODP
PPT
Ajax: User Experience
TXT
25250716 seminar-on-ajax text
PPT
Ajax Introduction
PPT
PPT
PDF
Introduction to AJAX
Using Ajax In Domino Web Applications
Ajax ppt
Ajax Presentation
Synapseindia dot net development web applications with ajax
AJAX
Introduction to ajax
Ajax
Ajax
Ajax: User Experience
25250716 seminar-on-ajax text
Ajax Introduction
Introduction to AJAX

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
Teaching material agriculture food technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation theory and applications.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Understanding_Digital_Forensics_Presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
A Presentation on Artificial Intelligence
cuic standard and advanced reporting.pdf
NewMind AI Monthly Chronicles - July 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
Approach and Philosophy of On baking technology
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation_ Review paper, used for researhc scholars
Review of recent advances in non-invasive hemoglobin estimation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Teaching material agriculture food technology
The AUB Centre for AI in Media Proposal.docx
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation theory and applications.pdf

Ajax Presentation

  • 1. A synchronous J avaScript A nd X ML What? Why? How? Who?
  • 2. Overview Web applications are based on request/response During request process, nothing is displayed
  • 3. Overview Please wait … Request Response Client Server
  • 4. Overview: Traditional Web App. Life Cycle Request
  • 5. Process Overview: Traditional Web App. Life Cycle Loading
  • 6. Response Overview: Traditional Web App. Life Cycle
  • 7. Overview To improve performance, you either: load everything & display required data (JavaScript) OR keep moving back and forth between client & server An alternative way is to use AJAX .
  • 8. What? AJAX: Asynchronous JavaScript And XML AJAX uses a XML to send and receive asynchronous requests/responses and then leverages presentation technologies ( JavaScript , DOM, HTML, and CSS) to process the response. Most browsers support the necessary technology for AJAX.
  • 9. AJAX enables you execute a server-side method through a JavaScript call, without requiring a browser refresh. What?
  • 10. AJAX Web App. Life Cycle Request
  • 11. Process AJAX Web App. Life Cycle Nothing here
  • 12. Response AJAX Web App. Life Cycle
  • 13. Real world example Falafel & Jumaa
  • 14. Let us start cooking, I am HUNGRY! Ingredients: JavaScript To build client-side functionality (using DOM). XMLHttpRequest object To enable JS to access the server asynchronously . Server Side Technology To handle the request. The response will be XML .
  • 15. How (how to use AJAX)? Modify web.config Register the web page Use <Ajax.AjaxMethod()> attribute Write JavaScript to handle the response
  • 16. How (how to use AJAX)? Do not just tell me, show me a demo!
  • 17. Who (who use AJAX)? Windows Live Mail ( http:// www.hotmail.com ) Google Goole Mail ( http:// mail.google.com ) Google Maps ( http:// maps.google.com ) Google Suggests ( http://www.google.com/webhp?complete=1&hl=en ) Yahoo! Flickr ( http://www.flickr.com ) Meebo ( http:// www.meebo.com ) … Who’s next (you???)
  • 18. Who (who uses AJAX)?
  • 19. FAQ What data types does AJAX support? AJAX supports: Primitive types of custom classes and arrays integers, strings, double, booleans, DateTime, DataSets and DataTables All other types have their ToString values returned What about Session s? AJAX supports Session read and write
  • 20. Why (why to use AJAX)? Faster web actions Less (or no) page refreshes Reduce network traffic Decreased server-side bandwidth usage Web apps that rival (or surpass) installed GUI apps
  • 21. Why (why not to use AJAX)? Bye bye, bookmarks! Search engines may not be able to index all pages. Inaccurate Back & Forward button actions. JavaScript can be easily disabled from client side.
  • 22. Do not reinvent the wheel, Many AJAX frameworks are available now: AJAX.Net Abobe (Spry). Google (Google Web Toolkit). Microsoft (Atlas). … others are coming.
  • 23. AJAX.Net Server Side Code [AjaxMethod] public DataSet GetDataSet(){ DataSet ds = new DataSet(); ... return ds; }
  • 24. AJAX.Net Client Side Code function doTest1(){ AJAXDemo. GetDataSet(_callback1); } function _callback1(res){ var cols = res.value.Tables[0].Columns.length; var rows = res.value.Tables[0].Rows.length; alert(cols + &quot; cols and &quot; + rows + &quot; rows&quot;); }
  • 25. AJAX.Net Dataset ( Creating a client-side DataSet using JS ) var ds = new Ajax.Web.DataSet(); var dt = new Ajax.Web.DataTable(); dt.addColumn(&quot;FirstName&quot;, &quot;System.String&quot;); dt.addColumn(&quot;Age&quot;, &quot;System.Int32&quot;); dt.addRow({&quot;FirstName&quot;:&quot;Michael&quot;,&quot;Age&quot;:28}); dt.addRow({&quot;FirstName&quot;:&quot;Tanja&quot;,&quot;Age&quot;:25}); ds.addTable(dt);
  • 26. AJAX.Net Dataset ( Creating a client-side DataSet using JS ) dt.addRow({&quot;FirstName&quot;:&quot;Michael&quot;,&quot;Age&quot;:28}); // or using an object var row = new Object(); row.FirstName = &quot;Michael&quot;; row.Age = 28; dt.addRow(row);
  • 27. One Day AJAX is not the end, one day you will look at this technology and LAUGH !!!