Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: To Use AJAX

Explains how to use AJAX in a real-world situation and how you can assess its value in a project.

Tutorial Details:

Introduction
AJAX, an acronym for Asynchronous JavaScript and XML, is the latest technology buzzword. Asynchronous means that you can make a request to a server via Hypertext Transfer Protocol (HTTP) and continue to process other data while waiting for the response. This means, for example, that you can make calls to a server-side script to retrieve data from a database as XML, send data to a server-side script to be stored in a database, or simply load an XML file to populate pages of your Web site without refreshing the page. However, along with all of the benefits, AJAX sparks some unquestionable debate over issues with the Back button. This article will help you to determine when AJAX is a good solution for developing your users' experiences.

I'm assuming that you have a basic understanding of the JavaScript and XML part of the acronym. Although you can request any type of text file with AJAX, I'll focus strictly on XML. I'll explain how to use AJAX in a real-world situation and how you can assess its value in a project. By the time you finish reading this article, you'll know what AJAX is as well as where, why, and how to use it. You're going to learn how to create the object, make the request, and customize the response, while maintaining good practices that provide an intuitive user experience.

I've created a sample project for this article (you can download the source code). The sample is a simple request that loads an XML file containing page content and parses the data to display it in an HTML page.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
To Use AJAX

View Tutorial:
To Use AJAX

Related Tutorials:

TimCam
TimCam is an easy-to-use webcam program written in (pure) Java. It was designed to mimic such fantastic projects as ConquerCam, but with an added bonus: TimCam is in the public domain.
 
Joott Quick Start Guide
Joott Quick Start Guide JooTemplates is a templating system to generate business documents, such as forms, mailings and reports. It is being developed with the following aims
 
JCalendar Library provides a ComboBox (JCalendarComboBox) for selecting a Date and a simple Panel (JCalendarPanel) for s
It is coded with 2 rules: * No hard coded Fonts or Colors, use the current Look and Feel * No hard coded locale behaviour, use the default or a given Locale (Start of Week, Name of Days/Months)
 
SQL Database Access with DBTags
SQL Database Access with DBTags In a J2SE or J2EE application, Java Database Connectivity (JDBC) can be used to create a connection with a SQL database, create database tables, retrieve result sets, and update the database. To use a database from a Jav
 
Real World HTML Parser
Real World HTML Parser The two fundamental use-cases that are handled by the parser are extraction and transformation (the syntheses use-case, where HTML pages are created from scratch, is better handled by other tools closer to the source of data). Whil
 
Use SWT for data entry
Use SWT for data entry Like many Java programmers, you may have given up on writing client-side window applications. There's a lot of debate about why client-side Java is out of fashion. But most of it boils down to the fact that Java—until now—cou
 
Testing J2EE applications
Testing J2EE applications There are certain aspects of J2EE applications that people associate with end-to-end tests rather than object tests. These include page flow—or navigating a Web application—and using container services, such as security and
 
Use Java to Interact with Your Clipboard
These days end users expect to use the ubiquitous "clipboard" concept as a transfer station for data, and if your applications don't support it, users won't be pleased. Learn how to use the java.awt.datatransfer package to cut, copy, and paste to a clipbo
 
JTimepiece
JTimepiece is the advanced library for working with dates and times in Java. Many easy-to-use methods in this API make it easy for any developer, from beginner to expert, to use JTimepiece.
 
ClassRemoter
ClassRemoter is a remote class wrapper generator for use with RMI. It can create remote wrappers for existing java classes and interfaces, that would not normally be used with RMI. The wrappers may then be used to access the public methods.
 
Accessing Databases Using Java and JDBC
This article will show how a Java Application, Applet or Servlet can access data stored in relational databases using the JDBC API.
 
Overview of JDBC and its use with Microsoft Access
JDBC provides a set of classes for Java with a standard SQL database access interface. Goal is uniform access to a wide range of relational databases.
 
Request bean ver. 1.5
Java bean allows you to proceed GET/POST requests to the specified host (cgi-script/servlet). So you can for example obtain contents of some page and use extracted information in your own jsp page.
 
Java Resources
There are all Java freebies. Some of these are old, and not under maintenance. Download and use them at your risk. In case of queries, mail subrahmanyam_avb@technologist.com or varalakshmi_a@techie.com.
 
100 % java open-source cryptographic software libraries.
Cryptixtm is an international volunteer effort to produce robust, open-source cryptographic software libraries. Cryptix products are free, both for commercial and non-commercial use and are being used by developers all over the world. Development is ...
 
JSP Tags
JSP tags do not use <%, but just the < character. A JSP tag is somewhat like an HTML tag. JSP tags can have a "start tag", a "tag body" and an "end tag". The start and end tag both use the tag name, enclosed in < and > characters. The end starts with
 
JDBC RowSet Implementations Tutorial (PDF)
This tutorial explains how to use the standard JDBC RowSet implementations that are provided as part of J2SE 5.0. Get up to speed with each RowSet definition and benefit from improved scalability and robustness.
 
The SATSA Developer's Guide
Describes how to use the SATSA APIs in MIDP applications. It includes lucid explanations and example code that illustrate how to communicate with a smart card and how to use cryptographic services. It is based on the SATSA Reference Implementation 1.0.
 
Using tiles-defs.xml in Tiles Application
In this lesson you will learn how to define and use the "plugin" definitation in tiles-defs.xml file.
 
Your suggestions
Your suggestions Use the form on this page to tell us your ideas for enhancing our products, or improving our customer service, or anything else that comes to mind. Subject: Suggestion: Your name: Your Email:
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.