Posted 19 February 2010 - 04:29 PM
1. Client makes a request to a specific web site requesting some content.
2. The server uses PHP to receive that request.
3. The server uses PHP to query the database and gets the relevant data.
4. The server uses PHP tp create something meaningful from that data and assembles it in the form of a webpage.
5. The server sends the web content back to the client,
6. The client gets the content.
Ajax is used when you want to send data back and forth between a client and server without having to reload the entire page. So in the instance of a chat client, it would go something like this:
1. Type something into a window of some sort and hit send.
3. Server gets the information using PHP, formats it, and sends it on to the recipient.
4. The server creates some content using PHP that is sent back to the server using an AJAX return.
5. The client gets the content and updates some small part of the page that is being viewed.
Updating a forum post would be similar to this, except that instead of data being pushed to another chat client somewhere, the data would be stored in the database for later retrieval.
As far as a class project, what you are describing is a pretty significant project; and by significant, I mean it would be a challenge to advanced programmers. It is certainly not something that you are going to do in a few weeks (other than maybe a proof of concept). Are you allowed to use third party libraries, because there are some libraries available that make AJAX pretty painless; otherwise dealing with different browsers manually sucks.