聊天室原则/教程的代码 [英] code for chat room principles/ tutorial

查看:78
本文介绍了聊天室原则/教程的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我在C#中使用ASP.NET已经有一段时间了,但我第一次尝试在我的网站上创建一个聊天室。网上有很多聊天室的代码,但是我无法找到任何特定于我需要的代码教程。我想要一个聊天室



1.用户可以与管理员沟通,而不是彼此沟通。

2.用户或管理员可以通过谈话期间的文件/图像。

3.聊天记录应存储在Sql server中。

4.如果管理员离线,用户应该能够为管理员留言。

5.在聊天过程中传递信息时应该有信号/声音,可选择静音...



我只是不想复制任何代码并在我的网站上使用它。我想学习基本原理和逻辑,以便根据我的需要修改聊天代码。



任何可以帮助教育我的教程/参考/代码这个编码区域非常有用。



非常感谢

解决方案

请先查看两个问题的评论。 InsertCleverUserName的评论建议您可以做什么,但是通过评论应该向您解释为什么您不应该寻找手册教您如何做一些由您自己的要求描述的事情。而且,更一般地说,在某些应用领域寻找手册是非常不切实际的。相反,您应该在常规编程和一些特定的编程领域中查找手册。在所有情况下,它不应该是聊天。这种方法可能会更有成效,因为你更大的目标是很难进行一次特定的聊天(再次,你想要的不是聊天),而是学习如何开发软件和完成软件项目。



因此,在您的情况下,假设您熟悉一般编程和.NET,进一步阅读可能包括:

http://www.asp.net/get-started [ ^ ],

http://www.asp.net/ mvc [ ^ ],

http://www.asp.net/web-pages [ ^ ],

http://www.asp.net/entity-framework [ ^ ] ,

http://www.asp.net/identity [ ^ ],

http://www.asp.net/signalr [ ^ ],

http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/introduction-to-signalr [ ^ ] 。



对于SignalR,您需要首先了解其作为推送技术的价值。请参阅:

http://en.wikipedia.org/wiki/Push_technology [< a href =http://en.wikipedia.org/wiki/Push_technologytarget =_ blanktitle =New Window> ^ ],

http://en.wikipedia.org/wiki/Pull_technology [ ^ ]。



此CodeProject文章非常实用:Asp.Net SignalR聊天室 [ ^ ]。



-SA

While I have been using ASP.NET with C# for quite some time, I am trying to create a chat room on my site for the first time. The net is full of codes for chat rooms but I could not figure out any code tutorial specific to my needs. I want a chat room where

1. users can communicate with administrator, not with each other.
2. users or administrator can pass on document/ images during conversation.
3. The record of chat should be stored in Sql server.
4. If the administrator is off line, the users should be able to leave a message for administrator.
5. There should be a signal / sound whenever a message is passed during chat with option to mute the sound

I just don't want to copy any code and use it on my site. I want to learn the basic principles and logic so that I can modify the chat code according to my needs.

Any tutorial/ reference/ code that can help educate me in this area of coding shall be highly useful.

Many thanks

解决方案

Please look at first two comments to the question. The comment by InsertCleverUserName suggests what you could do, but by comment should explain to you why you should not look for the "manual" teaching you how to do something which is described by your own requirements. And, more generally, it is very impractical to look for manuals in some application field. Instead, you should look for manuals in general programming and some specific fields of programming. In all cases, it should not be about chats. This approach could be way more productive, because your bigger goal is hardly making one specific chat (again, what you want is not a "chat"), but learn how to develop software and complete software projects.

So, in your case, assuming you know general programming and .NET well, further reading may include:
http://www.asp.net/get-started[^],
http://www.asp.net/mvc[^],
http://www.asp.net/web-pages[^],
http://www.asp.net/entity-framework[^],
http://www.asp.net/identity[^],
http://www.asp.net/signalr[^],
http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/introduction-to-signalr[^].

As to SignalR, you need to start with understanding of its value as a push technology. Please see:
http://en.wikipedia.org/wiki/Push_technology[^],
http://en.wikipedia.org/wiki/Pull_technology[^].

This CodeProject article can be very useful: Asp.Net SignalR Chat Room[^].

—SA


这篇关于聊天室原则/教程的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆