What language for a Web Chat? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
开发者_StackOverflow Improve this questionI need to create a simple web chat ( like facebook chat )
What language do I need to use ( server-side ) ?
Erlang ? PHP ? Python ? Ruby ? ecc
Are there any examples ?
Thanks ^_^
Most web-based chat apps I've seen are a combination of server-side code (of various flavors) and client-side javascript. On balance I'd say it doesn't matter what you use on the server side, go with what you know.
You might want to check out Node.js. It is server-side javascript, so it's easier to communicate with client-side javascript.
As a matter of fact, they have a chat demo here along with the source code.
Node.js is MADE for this type of thing. I'd recommend it.
The answer is that you can use any language you want on the server side, just like any other programming exercise. Really.
You'll save yourself a lot of time and headaches if you use something that's already been written, though. XMPP (and any decent XMPP server) has a web interface built in to the protocol, and any decent server implements it.
On the client, I use a JavaScript library called Strophe to connect. There's also JSJaC, extracted from a pre-built open-source web chat client called JWChat.
This should get you started.
Actually for the best UI you can use Silverlight, by using the power of mighty .NET. It's C# you know.
精彩评论