Ajax Using JSP with prototype.js

5,444 views
5,292 views

Published on

In This ppt you see, How a Ajax application is create using prototype.js and jsp.

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,444
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
86
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Ajax Using JSP with prototype.js

  1. 1. AJAX Changing the shape of the Web <ul><li>Tushar Chauhan </li></ul>5 th CE-1[ Roll No-16 ] [email_address] Ms.V.A.Parekh Prepaid By. Guided By. Lect In CE/IT Dept .
  2. 2. Introduction <ul><li>What is AJAX ? </li></ul><ul><li>AJAX Request-Response Cycle. </li></ul><ul><li>Working of AJAX </li></ul><ul><li>Applications of AJAX </li></ul>
  3. 3. WHAT IS AJAX? <ul><li>Asynchronous Java script And XML. </li></ul><ul><li>It is not itself a technology but a group pf technologies such as </li></ul><ul><li>HTML </li></ul><ul><li>Java script </li></ul><ul><li>CSS </li></ul><ul><li>XML </li></ul><ul><li>DOM (document object model) </li></ul>
  4. 4. AJAX Request-Response Cycle.
  5. 5. How AJAX is Different?
  6. 6. Working of AJAX
  7. 8. Why we Use AJAX / Benefits of AJAX <ul><li>interface is much more responsive . </li></ul><ul><li>small part of the page is transferred at a time . </li></ul><ul><li>classic web application -content only – what is between the <body> tags -only one connection thread . </li></ul><ul><li>With AJAX, you only have to load the basic scripts and CSS files, and request the rest as content, through multiple connections . </li></ul><ul><li>Waiting time is reduced . </li></ul>
  8. 9. Advantages of AJAX <ul><li>Time saving </li></ul><ul><li>Maximum Usage of Bandwidth </li></ul><ul><li>Browser and platform independent applications </li></ul>
  9. 10. Disadvantage of AJAX. <ul><li>AJAX-powered application can increase development time and costs . </li></ul><ul><li>existing page conflicts -used to navigate and create bookmarks in modern browsers . </li></ul><ul><li>The biggest concern with AJAX is accessibility . </li></ul><ul><li>Turn off JavaScript support -fail-safe solution exists for those users . </li></ul><ul><li>Actual XMLHttpRequest object itself-only use it to access information from the host that served the initial page . </li></ul>
  10. 11. Why we use AJAX in our project ? <ul><li>Involves heavy server requests . </li></ul><ul><li>With multiple web forms that submit data to the server . </li></ul><ul><li>heavy traffic . </li></ul><ul><li>Display large amounts of data in a sequential manner without refreshing the entire page . </li></ul><ul><li>Users interact frequently . </li></ul><ul><li>Application response time is a concern </li></ul><ul><li>Loading times have to be as short as possible </li></ul>
  11. 12. Where not to use AJAX <ul><li>Plain, static HTML pages . </li></ul><ul><li>Application must be accessed by older browsers . </li></ul><ul><li>Loading times - bandwidth usage is not a primary concern . </li></ul><ul><li>Cost - time factors are paramount for the delivery of your project and your . </li></ul><ul><li>Development team cannot afford to build a complex AJAX framework . </li></ul>
  12. 13. AJAX Using Jsp <ul><li>Introduction -rapidly develop , easily maintain, information-rich, dynamic Web pages. </li></ul><ul><li>How to use Ajax in JSP </li></ul><ul><li>1. Ajax framework for java </li></ul><ul><li>2. Simple Ajax script for JSP </li></ul>
  13. 14. Ajax framework <ul><li>Using prototype.js </li></ul><ul><li>Dojotoolkit </li></ul><ul><li>Rico framework </li></ul>
  14. 15. Using Prototype.js <ul><li>http://prototypejs.org/download </li></ul><ul><li><script type=&quot;text/javascript&quot; src=&quot;/path/to/prototype.js&quot;></script> </li></ul><ul><li>Create one jsp file. </li></ul><ul><li>like ajax3.jsp </li></ul>
  15. 17. Second jsp file hello1.jsp
  16. 20. Supported Web Browser <ul><li>The XMLHttpRequest object is supported </li></ul><ul><li>Internet Explorer 5.0+ </li></ul><ul><li>Safari 1.2 </li></ul><ul><li>Mozilla 1.0 / Firefox </li></ul><ul><li>Opera 8+ </li></ul><ul><li>Google Chrome </li></ul><ul><li>Netscape 7. </li></ul>
  17. 21. Applications of AJAX / Who Using AJAX <ul><li>Google’s all product </li></ul><ul><li>Google Maps </li></ul><ul><li>Asynchronous downloads </li></ul><ul><li>Tiles and Layout </li></ul><ul><li>Stanford University / http://www.stanford.edu/ </li></ul><ul><li>Orkut. </li></ul>
  18. 22. THANK YOU! <ul><li>Tushar Chauhan </li></ul><ul><li>5 th CE-1[ Roll No-16] </li></ul><ul><li>[email_address] </li></ul>AJAX Changing the shape of the Web

×