How to create a chat function (like facebook or gmail) in asp.net? [closed]
I have searched through stackoverflow on the key words of "facebook chat in asp.net", just come out of some profounded suggestions. But I have some detail questions need to be cleared.
- Do people use database to store each message? Do they have to be saved in database?
- Do people use session to send/receive message?
- Is jQuery useful here?
Please give me a direction on how to develop chat function in asp.net
- Yes, most likely. Assuming they need to be saved somewhere the best answer is usually a database. What kind, SQL or NOSQL depends on scale and the skill set of the developers.
- There are lots of techniques for fetching new messages. Some Google keywords might be "long polling", ajax, etc.
- jQuery is a JavaScript library for handling common client side scripting tasks. You can do without, but if you know jQuery or some other JavaScript library it will save you from a lot of coding. Regardless if you are writing a chat system or something else.
As a side note. Don't look at the implementation of gmail or facebook. There are lots of descriptions out there on how they build their stuff. They build for immense scale. You don't. They use a nail gun because they need too, you just need a hammer.
精彩评论