什么是 strope 以及如何将它与 JQuery 一起使用?

发布于 2024-08-08 05:21:11 字数 72 浏览 3 评论 0原文

有人能解释一下什么是节段吗?

我相信这与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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

因为看清所以看轻 2024-08-15 05:21:11

Strope 不是 Jabber 客户端,也不是 XMPP 客户端。它是一个允许您轻松编写其中任何一个的库。您可以(非常困难)使用 Javascript 或 Jquery 从头开始​​编写 Jabber/XMPP 客户端,但是想象生成和发送这样的 XML 会非常困难:

<body xmlns='http://jabber.org/protocol/httpbind' sid='e4fcc09444a61059e88296a106e86e1ff1454f9b' wait='60' requests='2' inactivity='30' maxpause='120' polling='2' ver='1.8' from='localhost' secure='true' authid='1027072784' xmlns:xmpp='urn:xmpp:xbosh' xmlns:stream='http://etherx.jabber.org/streams' xmpp:version='1.0'><stream:features xmlns:stream='http://etherx.jabber.org/streams'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>

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:

<body xmlns='http://jabber.org/protocol/httpbind' sid='e4fcc09444a61059e88296a106e86e1ff1454f9b' wait='60' requests='2' inactivity='30' maxpause='120' polling='2' ver='1.8' from='localhost' secure='true' authid='1027072784' xmlns:xmpp='urn:xmpp:xbosh' xmlns:stream='http://etherx.jabber.org/streams' xmpp:version='1.0'><stream:features xmlns:stream='http://etherx.jabber.org/streams'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>

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.

摘星┃星的人 2024-08-15 05:21:11

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.

稚气少女 2024-08-15 05:21:11

该库的 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.

月隐月明月朦胧 2024-08-15 05:21:11

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文