From: Ryan Leavengood Date: 2005-06-23T02:54:48+09:00 Subject: Re: Q: writing a web chat room--sharing info? Matt C said: > > Does anybody have a better idea, or other suggestions? I think a database is the best approach. That way you have built-in archiving of the chats (which is a nice feature, though maybe not needed), as well as all the other things you get with a database. This sounds like a neat idea, BTW, and I bet it wouldn't be too hard with Rails and Ajax. The only issue is that since web browsers are pull-based (i.e. you can't really push content to them from a server), you will have to refresh the "chat window" fairly frequently with HTTP requests (probably XmlHttpRequests using Ajax.) If you made the process for refreshing as efficient as possible and only included the changes (through some kind of "was last updated on" functionality), it shouldn't be too bad of a load on the server. > Also, a completely unrelated question for those who read this far. I > notice there seem to be two competing Ruby conventions for naming > methods. My copy of the Pickaxe book (first edition) uses > mixedCaseNaming. Other sources (Ruby itself, frex) use > underscore_naming. Is one of these prevalent, or is it whichever you > like better? I think the "standard" is underscore_naming because, as you said, that is what the core Ruby classes use. That is also what I prefer, but mostly because that is also what I use at work in Java (at least for member variables), so I'm used to it. Ryan