22
AJAX Changing the shape of the Web Tushar Chauhan 5 th CE-1[ Roll No-16 ] [email protected] Ms.V.A.Parekh Prepaid By. Guided By. Lect In CE/IT Dept .

Ajax Using JSP with prototype.js

Embed Size (px)

DESCRIPTION

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

Citation preview

Page 1: Ajax Using JSP with prototype.js

AJAX Changing the shape of the Web

Tushar Chauhan

5th CE-1[ Roll No-16 ]

[email protected]

Ms.V.A.Parekh

Prepaid By. Guided By.

Lect In CE/IT Dept .

Page 2: Ajax Using JSP with prototype.js

2

Introduction

• What is AJAX ?• AJAX Request-Response Cycle.• Working of AJAX• Applications of AJAX

Page 3: Ajax Using JSP with prototype.js

3

WHAT IS AJAX?

• Asynchronous Java script And XML.• It is not itself a technology but a group pf

technologies such as• HTML• Java script• CSS• XML• DOM (document object model)

Page 4: Ajax Using JSP with prototype.js

4

AJAX Request-Response Cycle.

Page 5: Ajax Using JSP with prototype.js

5

How AJAX is Different?

Page 6: Ajax Using JSP with prototype.js

6

Working of AJAX

Page 7: Ajax Using JSP with prototype.js

7

Page 8: Ajax Using JSP with prototype.js

8

Why we Use AJAX / Benefits of AJAX

• interface is much more responsive .• small part of the page is transferred at a time .• classic web application -content only – what is

between the <body> tags -only one connection thread .

• With AJAX, you only have to load the basic scripts and CSS files, and request the rest as content, through multiple connections .

• Waiting time is reduced .

Page 9: Ajax Using JSP with prototype.js

9

Advantages of AJAX

• Time saving• Maximum Usage of Bandwidth • Browser and platform independent applications

Page 10: Ajax Using JSP with prototype.js

10

Disadvantage of AJAX.

• AJAX-powered application can increase development time and costs .

• existing page conflicts -used to navigate and create bookmarks in modern browsers .

• The biggest concern with AJAX is accessibility .• Turn off JavaScript support -fail-safe solution exists

for those users .• Actual XMLHttpRequest object itself-only use it to

access information from the host that served the initial page .

Page 11: Ajax Using JSP with prototype.js

11

Why we use AJAX in our project ?

• Involves heavy server requests .• With multiple web forms that submit data to the server .• heavy traffic .• Display large amounts of data in a sequential manner

without refreshing the entire page .• Users interact frequently .• Application response time is a concern • Loading times have to be as short as possible

Page 12: Ajax Using JSP with prototype.js

12

Where not to use AJAX

• Plain, static HTML pages .• Application must be accessed by older browsers .• Loading times - bandwidth usage is not a primary

concern .• Cost - time factors are paramount for the delivery of

your project and your .• Development team cannot afford to build a complex

AJAX framework .

Page 13: Ajax Using JSP with prototype.js

13

AJAX Using Jsp

• Introduction-rapidly develop , easily maintain, information-rich, dynamic Web pages.

• How to use Ajax in JSP

• 1. Ajax framework for java• 2. Simple Ajax script for JSP

Page 14: Ajax Using JSP with prototype.js

14

Ajax framework

• Using prototype.js• Dojotoolkit• Rico framework

Page 15: Ajax Using JSP with prototype.js

15

Using Prototype.js

• http://prototypejs.org/download• <script type="text/javascript"

src="/path/to/prototype.js"></script> • Create one jsp file. like ajax3.jsp

Page 16: Ajax Using JSP with prototype.js

16

Page 17: Ajax Using JSP with prototype.js

17

Second jsp file hello1.jsp

Page 18: Ajax Using JSP with prototype.js

18

Page 19: Ajax Using JSP with prototype.js

19

Page 20: Ajax Using JSP with prototype.js

20

Supported Web Browser

• The XMLHttpRequest object is supported • Internet Explorer 5.0+• Safari 1.2• Mozilla 1.0 / Firefox• Opera 8+• Google Chrome• Netscape 7.

Page 21: Ajax Using JSP with prototype.js

21

Applications of AJAX / Who Using AJAX

• Google’s all product• Google Maps• Asynchronous downloads • Tiles and Layout • Stanford University / http://www.stanford.edu/• Orkut.

Page 22: Ajax Using JSP with prototype.js

THANK YOU!

AJAX Changing the shape of the

Web

Tushar Chauhan5th CE-1[ Roll No-16][email protected]