Home arrow XML arrow Building an AJAX-Based Chat: Coding the Receiver Module
XML

Building an AJAX-Based Chat: Coding the Receiver Module


In this second part of a three part series of articles, you will learn a lot more material related to building the AJAX-based chat. You will discover how two requester objects fetch or add new messages to the database. Also, you will see the code for a simple login page for registering users that want to access the chat page.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 24
November 15, 2005
TABLE OF CONTENTS:
  1. · Building an AJAX-Based Chat: Coding the Receiver Module
  2. · Retrieving messages from the database: defining the “getChatData()” function
  3. · Building the chat layout: writing the “createMessageBoard()” and “createMessageBox()” functions
  4. · Registering chat users: defining a simple login page
  5. · Putting the pieces together: building the whole chat page

print this article
SEARCH DEVARTICLES

Building an AJAX-Based Chat: Coding the Receiver Module
(Page 1 of 5 )

This is it. The stuff you were waiting for! Welcome to part two of the series “Building an AJAX-based chat.” As I hopefully demonstrated in the previous article, building a chat application doesn’t demand that you be a seasoned Java programmer or even an expert developer working with IRC servers. Armed only with a basic knowledge of AJAX and JavaScript, it’s possible to create a simple (but extensible) chat program, which can be easily customized and integrated with existing Web applications, without suffering maintenance headaches.

Before I leap forward, it’s worth a brief look back to remind ourselves of the goal of this series. As you probably remember, in the first tutorial I wrote some of the JavaScript functions that make up the chat application, focusing particularly on the development of the “sender” module. This module is responsible for handling the requests for inserting new messages into the database table, together with updating the display of messages.

Throughout this second article, attention will be turned to writing the functions that compose the “receiver” module of the chat, which also uses a “receiver” requester object for retrieving the list of user messages from the database. In addition, I’ll show a couple of complementary functions, aimed at building the basic layout of the chat itself, as well as a basic login page for registering the nicknames of chat users. Hopefully, by the end of this article, you’ll have a clear idea of how both program modules fit into the whole application, in order to turn it into a fully working web-based chat.

Having established the goals of this tutorial, it’s time to move forward and start coding the chat’s receiver module. Let’s get going!


blog comments powered by Disqus
XML ARTICLES

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials