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.
Building an AJAX-Based Chat: Coding the Receiver Module (Page 1 of 5 )
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!