Ajax ?
what is this Ajax. I just know it's full form and know it's not any language.
I have created couple of jsp's.
I am not sure for what is this Ajax used for?
does using this makes web development easier? are there any examples that I can see to how ajax is used in jsp?
thanks.
[311 byte] By [
Rxyza] at [2007-10-2 12:34:10]

Is [url http://www.google.com/search?hl=en&q=ajax+programming+javascript&meta=]google[/url] not installed on your machine?
How about [url http://en.wikipedia.org/wiki/AJAX]Wikipedia[/url]?
They can tell you everything you need to know about Ajax, how it works, whats good/bad about it, and whether the kitchen sink is leaking or not.
Well maybe everything except the kitchen sink.
AJAX is like a javascript.
For example, if you were to make a request to the database and get a response, you can see your screen gets refreshed with the new data, but where as with AJAX user will not see any difference of sending request and receiving response.
Take a look at google suggest website. All that is done using AJAX.
An introduction to AJAX
Asynchronous JavaScript and XML or AJAX is a new technique for creating interactive web applications and to provide better user experience. Because of its asynchronous nature the user will never feel / waiting for the server has to respond. Using AJAX we can send the request to the server without submitting the entire page. It means we can able to refresh the page partially where we need to update the information instead of submitting the whole page. Let us have a detailed look about AJAX.
What is AJAX?
AJAX is not a technology or language but rather a group of technologies as JavaScript + CSS + XML. It is standards-based presentation (CSS + XHTML). It抯 just a style of design.
History of AJAX
AJAX is not new, Active use for six years. It was only available in IE (Since IE5 public preview in 1999), In Mozilla (Version just before 1.0). Primarily referred as Remote Scripting / XMLHttpRequest, later it was named as AJAX by Jesse James Garret.
Microsoft first implemented the XMLHttpRequest object in Internet Explorer 5 for Windows as an ActiveX object. Engineers on the Mozilla project implemented a compatible native version for Mozilla 1.0 (and Netscape 7). Apple has done the same starting with Safari 1.2.
Similar functionality is covered in a proposed W3C standard, Document Object Model (DOM) Level 3 Load and Save Specification. In the meantime, growing support for the XMLHttpRequest object means that is has become a de facto standard that will likely be supported even after the W3C specification becomes final and starts being implemented in released browsers (whenever that might be).
Why AJAX matters now?
In traditional web application model, if you want to update some part of the web page you should have to submit your page and have to wait for the server has to respond. It means you have to send the request to the server and have to wait for the server to process and to respond.
Web-Services, Portals and EIS related systems may necessitate better responsive and interactive application.
In AJAX model, User can able to send a request to the server using client side JavaScript instead of submitting an entire page to the server for updating the current web page partially. Using AJAX model we can send a request through client side JavaScript by 揦MLHttpRequest?object which is resides in browser.
To make web pages more responsive by exchanging smaller amount of data with the server behind the scene. So the entire web page doesn抰 have to be reloaded each time the user makes changes.
There are still plenty of challenges; both for technologist and for web page designers, in creating AJAX based application that really work effectively for users. But the new wave of Ajax applications reflects the industry抯 newfound (and still increasing) sophistication. We抮e smarter about the Web than we were before, and that alone opens up new possibilities for interaction designers.
I.e. ABC is an Online Trading Information Portal, Where the user can register and subscribe his/her interested areas like money market funds, Forex, shares etc. When the user login to the portal, he/she can able to see the latest information about the subscribed areas.
Here the page navigation might contain some of the portlets based on the user subscriptions; each portlet will represent a subscribed area. In this portlets some of them may require to update (Refresh) based on some time intervals. To achieve this developer will have to refresh the entire web page in traditional model.
that is well described in prev. post.
well, we use ajax to get the logic out to client's pc (thin server thick client arch.)
we do have serlets which just realize some security checks but mainly used to save the data to DB without analyzing it.
the client(browser) contains the validation logic stored in JavaScript, which runs first over the data submitted by user and on success forwards that to the server (which just saves it).
XML is used for information interchange between server and client. so there's no HTML sent over the network. just JSP, which contains references to XML model, javascript and XSLT which is used by browser to render the entire layout
Ajax is a web technique for trnaferring data dynamically between a client and server without posting the web page to server. Ajax may be used for form validation and autocompletion.
For a tutorial on form validation
http://www.regdeveloper.co.uk/2006/06/09/ajax_web_tutorial/
http://www.regdeveloper.co.uk/2006/06/20/ajax_web_tutorial_part2/