p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   Chat Application (http://p2p.wrox.com/showthread.php?t=16564)

sachindhillan August 8th, 2004 02:17 AM

Chat Application
i want to make a chat application in ASP 3.0, i think that i should take 3 frames, one for messege, another 1 for user and another one for writing messeges, and after some interval refresh Messege and User's frame, this is right one, or if somone have more good idea then plz help me.

Christiaan van Opstal August 8th, 2004 12:57 PM

If you're building this to gain some new skills or demo your work, AWESOME! If this chat room is going to be heavily used, you might want to reconsider. ASP wasn't built to handle something like this and you're going to run into a lot of problems when a lot of people start using it. Having said that, here's a few things to keep in mind:

- The most obvious way to keep track of who's in the chat room is to create a table that lists the people currently chatting. Avoid this. When a person closes their browser without logging out, their name will be stuck in the in the table and screw everything up. You're probably going to have to write some code that (a) updates a timestamp in their profile when they post, login, or refresh the chat window and then (b) tracks only users who've had activity in the last 15 minutes or so. This method does have a higher overhead cost on the server but it's still preferable to having names stuck in the 'Current Users' table indefinitely.

- Everytime you refresh the chat window it's going to have to load a lot of content. A better way to do it would be to include a hidden iFrame that refreshes and then uses JavaScript to add content using the innerHTML command. This isn't as cross-browser friendly as the simpler method, but it's faster.
If you do end up just using a single frame to load the chat content, make sure to add a bookmark at the end of the text so that people don't have to scroll down to view the new messages. Or, alternatively, you could just post the new content on top of the screen but this is counter-intuitive for most users.

- Finally, users are going to hear a click evertime the iFrame refreshes. There's no way to turn this off from your end. Either the user will have to disable it manually on their browser, or mute their speakers, otherwise the constant clicking will drive them nuts.

I hope this was helpful in some way.

Good luck on your project,


Hope this helped in some way

sachindhillan August 10th, 2004 12:32 AM

Thansk Chris

ur suggestion r good, i also think that ASP is better solution for like this application, i didn't work at ASP.Net, if someone worked at this can tell me that ASP.Net is better or have to use for this.

All times are GMT -4. The time now is 04:32 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.