English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

hi! im still new with ajax.. i need some suggestions about a project that i have. Its web-based with xml database, servlet and jsp in the back end. and java as its core. I'm confused with the flow, well actually with everything. Our project leader is really mad at our team and is planning to make our lives hell, that's why he gave us something that we are not familiar with.

2006-11-23 12:56:02 · 4 answers · asked by never.fade 3 in Computers & Internet Programming & Design

4 answers

Welcome to ajax!

ajax can be done 2 ways... the hard way, and the easy way! I've done both!

the hard way is to learn all the dom manipulation routines in javascript + be able to master (not just learn) xmlhttprequest, + master OOP in javascript. Boy was that a fun few months!

the easy way is to use a cool library where the whole js code boils down to a few lines! Boy was that a fun few hours!

I use jquery (http://jquery.com) , as do thousands of others!

it's new, it's new wave javascript written by one of the experts in the field John Resiq (http://ejohn.com) there are plenty of examples on the jquery site.

$.ajax(parm) is the call with parm an object that contains the url, the datatype (xml) and the functions to perform when the result is done (success or error)

It will save you time and make you a hero at work!

Oh yeah... jquery does json so easily!!!

2006-11-23 13:27:15 · answer #1 · answered by jake cigar™ is retired 7 · 0 0

I'm not a java programmer, I'm .net.
so there might be some subtle nuances
I'm missing.
But - here goes....

a browser makes a request, and the jsp page responds
with a rendered result.

information is changed in the browser, or more information is required, and the whole page "posts back" to the server to
update.

with the httprequest object, an "independent" connection can be made to the server, without returning the entire page.

the web application can communicate with the server "behind the scenes", while the user of the application still interacts with it.

as far as the objects and their flow, it would go something like this.

the data access stuff stays the same.
you have the initial page as 1 jsp
you can either have another page which
handles the ajax calls, or use the same one.
just check the request object (or whatever it's called in java)

In .net, there's something called an httpHandler, which
gets mapped to a file extension (.ashx).
when the request comes in for a file of that extension,
the class gets initiated by the runtime without having
to invoke the whole page framework of asp.net
I would assume that there's something equivalent in java.

I know it wasn't the most clear example, but I hope it helps.

One other thing..

Ajax uses xml for data interchange and presentation.
it's the de facto standard at the moment.

xml is very verbose, to the point of sometimes making me cringe.

while it has it's place in presentation, I think there is a better choice for data interchange.

That is JSON.
It's much more efficient when it comes to object representation and data interchange.

Anyway, hope that helps.

2006-11-23 13:23:01 · answer #2 · answered by ZressE 3 · 1 0

relies upon on the context. Ajax in Greek delusion replace into between the main substantial intense warriors on the Greek section indoors the Trojan conflict. Ajax in soccer is likely one among the main substantial in many circumstances used ecu communities, based in Amsterdam, Netherlands. Ajax in application Programming stands for Asynchronous JavaScript and XML, a fashion for optimizing the way a information superhighway information superhighway website is rendered onto the browser. Ajax is likewise an commercial air purifier from Colgate-Palmolive.

2016-12-29 09:41:38 · answer #3 · answered by everitt 3 · 0 0

i dont know ajax

2006-11-23 12:58:47 · answer #4 · answered by Anonymous · 0 2

fedest.com, questions and answers