Re: a simple chat system

Originally Posted by
renejimsoler96
my plan is having two frames in a window, frame 1 will be displaying the messages, it refreshes for every 3 seconds, and frame 2 will display the input for message...
That idea is actually more resource-intensive than the equivalent AJAX/AJAJ application with a 3-second update schedule. Everything at the model level is done more-or-less the same way, but you have to check more messages and write more to the web client than you would if you were just looking for messages newer than the last check and writing compact JSON or XML because you have to recreate the entire chat record page on every update.
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)