问题描述
我已经对JavaScript进行了一些研究,并发现一般共识是我正在寻找的是"彗星"设计模式.这种模式在jQuery之上建立了任何好的实现吗?如果没有,该模式是否有任何好的实现?不管这些问题的答案是什么,从实现站点点上是否有任何关于此模式的文档?
推荐答案
我编写了Till提到的插件.该插件是 bayeux 协议的实现.和回调式填充(通过XSS远程服务器).有一个 bayeux bayeux python的实现python cometd-twisted我听说我的插件与,但我曾经使用,但是我没有验证这一点.我已经对其进行了测试和验证,它与 cometd-jetty //code.google.com/p/erlycomet/" rel =" noreferrer"> erlycomet ,其中包含一个jQuery彗星示例.关于我的博客,还有更多信息,可以在其 Google代码页.希望此信息有帮助,如果需要在插件方面有进一步的帮助,请随时与我联系.
其他推荐答案
有人建立了使用jquery 的comet客户端.我不知道这是否好.我已经阅读了有关彗星的信息,并听说了它可以做的一切,但是我从来没有使用它.我目前的任何项目都没有时间,也没有用例.
我完全忘记添加一个用于实施彗星的链接.
每天都有彗星,他们有一个比较在线.比较强调了不同实施的成熟度.这很有趣,应该让您开始.
希望有帮助!
其他推荐答案
查看 ape project 用于实现实施的完整客户端和服务器端解决方案彗星图案.
问题描述
I've done some research into server push with javascript and have found the general consensus to be that what I'm looking for lies in the "Comet" design pattern. Are there any good implementations of this pattern built on top of jQuery? If not, are there any good implementations of this pattern at all? And regardless of the answer to those questions, is there any documentation on this pattern from an implementation stand-point?
推荐答案
I wrote the plugin mentioned by Till. The plugin is an implementation of the Bayeux protocol and currently supports long-polling (local server via AJAX) and callback-polling (remote server via XSS). There is a Bayeux implementation for Python called cometd-twisted that I have heard my plugin works with, but I have not verified this. I have tested and verified it works with cometd-jetty and erlycomet which has a jQuery Comet example included. There is more info on my blog and the current code with a basic chat example can be found on its google code page. Hope this info is helpful and feel free to contact me if need any further help with the plugin.
其他推荐答案
Someone built a client for Comet using jQuery. I don't know if it's any good though. I've read about Comet and heard about all the good it can do, but I have never gotten around to using it. Just had no time and no use case on any of my current projects.
I totally forgot to add a link as for implementing comet.
There is Comet Daily and they have a comparison online. The comparison emphasizes on maturity of the different implementation. It's pretty interesting and should get you started.
Hope that helps!
其他推荐答案
Check out the Ape Project for a complete client and server side solution that implements the comet pattern.