什么是 strope 以及如何将它与 JQuery 一起使用?
有人能解释一下什么是节段吗?
我相信这与XMPP有关?
如何使用 Jquery 将其合并到站点中?
Can somebody explain what strophe is?
I believe it has something to do with XMPP?
How can I incorporate it into a site using Jquery?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Strope 不是 Jabber 客户端,也不是 XMPP 客户端。它是一个允许您轻松编写其中任何一个的库。您可以(非常困难)使用 Javascript 或 Jquery 从头开始编写 Jabber/XMPP 客户端,但是想象生成和发送这样的 XML 会非常困难:
Strope 是一个 Javascript 函数库,它使编写 XMPP 客户端的过程变得更加容易。它具有允许您连接到服务器、向用户发送消息、添加联系人的方法,并且它知道需要发送到服务器以执行这些操作的 XML。它基本上可以完成所有困难的工作 - XML 生成、发送、连接和通信。这让您的生活变得更加轻松。
Strophe is not a Jabber Client, and its not an XMPP client. Its a library that allows you to easily write either of these. You could (with great difficulty) write a Jabber/XMPP Client from scratch using Javascript or Jquery, but this would be very difficult imagine generating and sending XML like this:
Strophe is a library of Javascript functions that makes the process of writing an XMPP client easier. It has methods to allow you to connect to a server, to send a message to a user, to add a contact - and it knows about the XML that needs to be sent to the server to carry out these actions. It basically does all the difficult stuff - the XML generating, sending, connecting and communicating stuff for you. Which makes your life a whole lot easier.
Strope 是一个 XMPP 客户端,用 Javascript 编写。更具体地说,它是一个 Javascript 库,可让您编写具有完整 XMPP 功能的实时 Web 应用程序。它是“实时”的,因为它使用“Comet-like”称为“BOSH”的技术 http://xmpp.org/extensions/xep-0124.html< /a>.
一旦您了解了 Strope 的基础知识,将它与 jQuery 一起使用就会“正常工作”,因为不存在冲突的代码、命名函数或依赖项。
Strophe is a XMPP client, written in Javascript. More specifically, it is a Javascript library that lets you write real-time web applications that have full XMPP capabilities. It is "real-time" because is uses a "Comet-like" technique known as "BOSH" http://xmpp.org/extensions/xep-0124.html.
Once you learn the basics of Strophe, using it with jQuery will "just work" as there is no conflicting code, named functions, or dependencies.
该库的 API 文档可以在这里找到 -> str<>phe API
它是一个独立于 jQuery 的 javascript 库,但显然您可以从任何其他库调用任何 javascript 库,因此我不相信您对特定的 jQuery 集成有任何要求。
The API documentation for the library can be found here -> str<>phe API
It's a javascript library that's separate to jQuery but obviously you can call any javascript library from any other so I don't believe you'll have any requirement for a specific jQuery integration.
Strope 已经使用了 jQuery。事实上,Strope 构建器 API 借用了 jQuery 的 $() 语法。看一下源代码附带的 echobot 示例。一定要查看 Strope Google 群组 (http://groups.google.com/group/strope),您会发现 Jack Moffitt(Strope 的创建者)会立即亲自回答问题。
Strophe already uses jQuery. In fact, the Strophe builder APIs borrow the $() syntax from jQuery. Take a look at the echobot example that comes with the source. Definitely check out the Strophe Google group (http://groups.google.com/group/strophe), where you would find Jack Moffitt (creator of Strophe) promptly answers questions himself.