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

What's hot (20)

PPTX
Javascript
Nagarajan
 
PPTX
jQuery
Dileep Mishra
 
PPTX
An Introduction to the DOM
Mindy McAdams
 
PPT
Java Script ppt
Priya Goyal
 
PPTX
JavaScript Promises
L&T Technology Services Limited
 
PDF
Nodejs presentation
Arvind Devaraj
 
PPTX
Ajax
Tech_MX
 
PPT
Ajax presentation
engcs2008
 
PDF
Introduction to ajax
Nir Elbaz
 
PDF
Spring MVC Framework
Hùng Nguyễn Huy
 
PPT
Introduction to Javascript
Amit Tyagi
 
PDF
Express node js
Yashprit Singh
 
PDF
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
PPTX
Express js
Manav Prasad
 
PPTX
Java script
reddivarihareesh
 
PDF
Intro to Asynchronous Javascript
Garrett Welson
 
PPT
Xml http request
Jayalakshmi Ayyappan
 
PDF
Angular Observables & RxJS Introduction
Rahat Khanna a.k.a mAppMechanic
 
PPTX
Introduction à ajax
Abdoulaye Dieng
 
Javascript
Nagarajan
 
An Introduction to the DOM
Mindy McAdams
 
Java Script ppt
Priya Goyal
 
JavaScript Promises
L&T Technology Services Limited
 
Nodejs presentation
Arvind Devaraj
 
Ajax
Tech_MX
 
Ajax presentation
engcs2008
 
Introduction to ajax
Nir Elbaz
 
Spring MVC Framework
Hùng Nguyễn Huy
 
Introduction to Javascript
Amit Tyagi
 
Express node js
Yashprit Singh
 
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
Express js
Manav Prasad
 
Java script
reddivarihareesh
 
Intro to Asynchronous Javascript
Garrett Welson
 
Xml http request
Jayalakshmi Ayyappan
 
Angular Observables & RxJS Introduction
Rahat Khanna a.k.a mAppMechanic
 
Introduction à ajax
Abdoulaye Dieng
 

Viewers also liked (20)

PPTX
Ajax ppt - 32 slides
Smithss25
 
PPT
Ajax Ppt
Hema Prasanth
 
PPTX
Ajax presentation
Bharat_Kumawat
 
PPTX
Ajax for dummies, and not only.
Nerd Tzanetopoulos
 
PDF
Ajax Introduction Presentation
thinkphp
 
PPT
Ajax Ppt 1
JayaPrakash.m
 
PPT
An Introduction to Ajax Programming
hchen1
 
PDF
основы Ajax презентация
sivorka
 
PPTX
Overview of AJAX
Roshith S Pai
 
PDF
Ajax - Presente e futuro delle applicazioni web
Dominopoint - Italian Lotus User Group
 
DOCX
Arpanet
talozumba
 
PDF
Corso base di Tecnologie WEB - una visione d'insieme
Studiabo
 
PPTX
Business consultants what they do and how important are they
Cooperative Computing
 
DOCX
Deber 1
Cand Jof
 
PDF
youthpass_Jakub2015
Jakub Pajan
 
PPTX
ESL Update for Principals 12/11/12
Eric Lech
 
PPTX
Arpanet
jeremygc99
 
PPTX
Guerrilla rural del ERP
Nicolás Barroso
 
PDF
MLM Portfolio
Mark McIntire
 
PPTX
Introduction to HTML5 Canvas
Mindy McAdams
 
Ajax ppt - 32 slides
Smithss25
 
Ajax Ppt
Hema Prasanth
 
Ajax presentation
Bharat_Kumawat
 
Ajax for dummies, and not only.
Nerd Tzanetopoulos
 
Ajax Introduction Presentation
thinkphp
 
Ajax Ppt 1
JayaPrakash.m
 
An Introduction to Ajax Programming
hchen1
 
основы Ajax презентация
sivorka
 
Overview of AJAX
Roshith S Pai
 
Ajax - Presente e futuro delle applicazioni web
Dominopoint - Italian Lotus User Group
 
Arpanet
talozumba
 
Corso base di Tecnologie WEB - una visione d'insieme
Studiabo
 
Business consultants what they do and how important are they
Cooperative Computing
 
Deber 1
Cand Jof
 
youthpass_Jakub2015
Jakub Pajan
 
ESL Update for Principals 12/11/12
Eric Lech
 
Arpanet
jeremygc99
 
Guerrilla rural del ERP
Nicolás Barroso
 
MLM Portfolio
Mark McIntire
 
Introduction to HTML5 Canvas
Mindy McAdams
 
Ad

Similar to Ajax Presentation (20)

PPT
jQuery Ajax
Anand Kumar Rajana
 
PPT
Using Ajax In Domino Web Applications
dominion
 
PPT
Ajax ppt
Sanmuga Nathan
 
PPT
Ajax
TSUBHASHRI
 
PPT
Ajax Presentation
ronaldmam
 
PPT
Synapseindia dot net development web applications with ajax
Synapseindiappsdevelopment
 
PPT
AJAX
ARJUN
 
PPT
Ajax
NIRMAL FELIX
 
PPTX
Introduction to ajax
Raja V
 
PDF
Ajax
soumya
 
PPT
Ajax
devisp
 
ODP
Ajax3
Brian Moschel
 
PPT
Ajax: User Experience
petrov
 
TXT
25250716 seminar-on-ajax text
Kamleshh Chandnani
 
PPT
Ajax Introduction
Oliver Cai
 
PPT
AJAX
ankurgupta
 
PPT
AJAX
Akhil Kumar
 
jQuery Ajax
Anand Kumar Rajana
 
Using Ajax In Domino Web Applications
dominion
 
Ajax ppt
Sanmuga Nathan
 
Ajax Presentation
ronaldmam
 
Synapseindia dot net development web applications with ajax
Synapseindiappsdevelopment
 
AJAX
ARJUN
 
Introduction to ajax
Raja V
 
Ajax
soumya
 
Ajax
devisp
 
Ajax: User Experience
petrov
 
25250716 seminar-on-ajax text
Kamleshh Chandnani
 
Ajax Introduction
Oliver Cai
 
Ad

Recently uploaded (20)

PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 

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 !!!