Wednesday, June 21st, 2006
On the Oracle Technology Network today, there’s a new tutorial that steps developers through the process of getting Ajax and their Java applications to play nicely together.
In this article Iâ€™ll present the main methods for exchanging data between Ajax clients and servers, comparing the traditional Web application model with the Ajax model. I will also discuss techniques for handling and processing the data on both ends.
Next up, they give an example of sending a request (using a library created in a previous article) and include the functions to abort the request if needed, send a saved request, and send a request to the remote server for JSON to load.
From there, it’s a switch over to the server side of things. They talk about data validation functionality, including adding an error handler, and build up the code needed for an XMLSchema and DocumentBuilder object. They follow with the code to extract the information from the pased in XML, including fetching functions for different types of values. Lastly, they send back a response to the waiting client-side script, and give examples of both XML and JSON response types.
Posted by Chris Cornutt at 1:34 pm