Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Web Application Question


  • Please log in to reply
3 replies to this topic

#1 doe22

doe22

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:07:28 PM

Posted 19 February 2010 - 03:56 PM

So for one of my classes (no I'm not asking anyone to do my project for me) we need to make a web application that interfaces with a database, has a nice UI, and supports chat, threaded discussion, and connecting to e-mail. There's more specific requirements than that, but I'm just looking for some info.

We're planning on using MySQL for database, PHP for UI, and AJAX for connections and some aspects of the application. Nobody in my group is very familiar with AJAX, so I just want to check some stuff. I understand AJAX is capable of doing chat and threaded discussion but I've been trying to research and haven't found anything on threads. I've found tutorials on creating chat scripts incorporated with MySQL, but so far nothing for threads. So two questions:

Does anyone know of any tutorial for setting up threaded discusion/forums in AJAX?
Do our language choice ideas sound reasonable for the stuff we want to do?

Again, none of us are terribly experienced, so I was hoping somebody who's done a fair amount of programming could give us some advice.

I realize my info isn't too descriptive, so if you'd like more please ask me.

Thank you!

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:05:28 PM

Posted 19 February 2010 - 04:29 PM

AJAX is not a language. AJAX is a term associated with using Javascript and XML to send and receive data from a server and client asynchronously. That is all it can do. So no, you can not set up threaded discussions and forums using AJAX. Other than that, your choice of languages is going to have to include Javascript out of necessity. Using the languages you have chosen, here is sort of a model on how things work on a forum like BC, for instance.

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.
2. Use Javascript to read what you just typed, and send it to the server using an AJAX call.
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.

#3 doe22

doe22
  • Topic Starter

  • Members
  • 20 posts
  • OFFLINE
  •  
  • Local time:07:28 PM

Posted 26 February 2010 - 11:31 AM

Thank you for your help groovicus.

Now that you remind me of it, I do remember that AJAX isn't a language. I haven't really done a lot of web stuff so I forgot that. We will probably be using Javascript and XML.

Thank you for the advice on how a forum and chat works. This will be very helpful.

And thank you for your concern that this might be too much for a class project, but it's not as bad as I might have made it out to be in my original post. It's not just me working on this, I'm in a project management class with a group of 9 and we've got 4 reasonably experienced programmers working on it. The whole project is due at the end of the semester, not in a couple of weeks. And yes, we're allowed to use third-party libraries which will hopefully be very helpful.

Thank you again!

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:05:28 PM

Posted 26 February 2010 - 12:11 PM

You might want to check out the Yahoo User Interface libraries then. They have a dead-simple library for handling AJAX calls, and some other goodies. http://developer.yahoo.com/yui/2/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users