页面之间的通信 [英] Communication between pages

查看:104
本文介绍了页面之间的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想启用一个用户能够通过一个位点与其他用户进行通信。我知道,ASP.net是无状态的,但我可以用于此同步的沟通? Java小?

I want to enable an user to be able to communicate with other users through a site. I know that ASP.net is stateless, but what can I use for this synced communication? Java servlets?

感谢您

推荐答案

我不认为你需要设置的Java只是使用servlet这一点。我将使用AJAX和数据库。我不知道ASP.NET但我PHP是在这种情况下类似,是也基本上无状态。如果你想显示某种类型的两个不同的用户,比如说之间的异步通信,从两个不同的会议,没有很多令人耳目一新(如聊天),你可以让AJAX页面不断地轮询新邮件的数据库,而当显示它们他们进来,你也可以使用AJAX来插入新的消息,给这个消息的数据结构,用户读/写访问。由于其他用户正在做同样的事情,用户A应该看到新邮件弹出时用户B类型它们

I don't think you need to set up Java just to use a servlet for this. I would use AJAX and the database. I don't know ASP.NET but I PHP is similar in this case, being also basically "stateless". If you want to display some kind of asynchronous communication between two different users, say, from two different sessions, without a lot of refreshing (like chat), you can have the AJAX page constantly poll the database for new messages, and display them when they come in. You can also use AJAX to insert the new messages, giving the user read/write access to this messages data structure. Since the "other" user is doing the same thing, user A should see new messages pop up when user B types them in.

这就是你的意思?

这篇关于页面之间的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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