如何使用经典Asp进行实时通知 [英] How Can I Make Live Notifications Using Classic Asp

查看:87
本文介绍了如何使用经典Asp进行实时通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在开发一个asp脚本,我需要像facebook那样进行实时通知,所以有人可以向我解释如何制作它

谢谢

hi everyone , i'm developin an asp script & I need to make live notifications like facebook , so can someone pls explain to me how to make it
thanks

推荐答案

请参阅我对该问题的评论。这完全是关于推动技术 vs pull技术的可能性。 HTTP协议是无状态,因此使用推送技术是一个问题。请参阅我过去的答案和参考文章:网站帐户的应用程序'信息中心' [ ^ ]。



首先,请阅读是为了获得一些背景知识。我真的怀疑你能找到任何有利于ASP的东西,但是谁知道呢?您可以尝试: http://bfy.tw/W5N [ ^ ]。



但一般来说,我认为ASP太过时和过时了。如果可能,我建议切换到ASP.NET和SignalR:

https:/ /en.wikipedia.org/wiki/ASP.NET [ ^ ],

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

https://en.wikipedia.org/wiki/SignalR [ ^ ],

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



-SA
Please see my comment to the question. This is all about the possibility of having push technology vs pull technology primarily used in Web. The HTTP protocol is stateless, so using push technology is a problem. Please see my past answer and referenced article: Application 'dashboard' for website accounts[^].

First of all, please read is to get some background. I really doubt you can find anything good for ASP, but who knows? You can try: http://bfy.tw/W5N[^].

But generally, I think ASP is too outdated and obsolete. I would really recommend, if possible, to switch to ASP.NET and SignalR:
https://en.wikipedia.org/wiki/ASP.NET[^],
http://www.asp.net[^],
https://en.wikipedia.org/wiki/SignalR[^],
http://www.asp.net/signalr[^].

—SA


ok - 有几种方法可以做到这一点。我发现最好是 http://signalr.net [ ^ ]



它允许您从服务器端调用客户端的javascript。您可以保留每个人的连接列表,并定位一组特定的连接,所有连接(广播)或单个连接。



您也可以从客户端javascript调用SignalR方法。许多聊天客户都使用这个。



我使用SignalR。每次会话需要1次额外连接,但这非常值得。



你必须阅读它。我花了大约一天的时间来启动和运行我的第一个集线器,但网上有很多帮助。



如果您有任何具体问题,请发布一个问题:)< br $> b $ b

Andy
ok - There are several methods of how you can do this. I found the best to be http://signalr.net[^]

It allows you to call javascript on the client side from the server side. You can keep a list of everyones connections and target a specific group of connections, all connections (broadcast) or a single connection.

You can also call SignalR methods from the client side javascript. Many chat clients use this.

I use SignalR. It takes 1 extra connection per session but it's well worth it.

You'll have to read up on it. It took me about a day to get my first hub up and running but there is loads of help online.

Post a question if you have any specific problems :)

Andy


实时推送通知和经典ASP是不可能的!





请参阅上的此示例www.w3schools.com>服务器已发送事件或通过Copy& amp;获取完整的URL粘贴( http://www.w3schools.com/html/html5_serversentevents.asp )。 此示例为使用PHP或ASP和HTML进行表示以查看之间的差异。 ASP是PHP源代码之后的描述。这只是第一步!

Live push Notifications and Classic ASP are prossible!



See this example at www.w3schools.com > Server Sent Events or take the full URL by Copy & Paste (http://www.w3schools.com/html/html5_serversentevents.asp). This Example is using PHP or ASP and HTML for represent to see this differend between. ASP is in there description after PHP source code. This will be only the first step!



如果你改变主意,那就在客户端使用HTML the node.js(你必须谷歌它以了解更多关于这个文件的信息!)和ASP中的XML或者RSS-Generator。 Node.js再次加载XML中所需的信息,每隔10秒就会在时间间隔内重新获取XML文件的信息。
而且你必须知道的问题只有一个。 Node.js将更好地植入到SCRIPT-Section的HTML-Area中的ASP-File源代码中,以实现真正的工作。不是单独的单个文件。


If you changing your thinking, then use in Client Side HTML the node.js (You must google it for know more about this file!) and a XML oder RSS-Generator in ASP are usally. Node.js is loading again this needed information in XML by retaking the information of XML-file in Time intervals as every 10 seconds.
And there is only one problem that you must know. Node.js will be better implanted in your Source Code of ASP-File in HTML-Area of a SCRIPT-Section for real working. Not in a seperate single file.


这篇关于如何使用经典Asp进行实时通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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