10

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?

chris
  • 20,791
  • 29
  • 77
  • 90
  • This Q/A might be helpful: http://stackoverflow.com/questions/4266157/ajax-jabber-xmpp-client-recommendations-real-experience-only-please/4280347#4280347 – Andrew_1510 Jul 31 '13 at 03:29

4 Answers4

13

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.

reach4thelasers
  • 26,181
  • 22
  • 92
  • 123
1

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.

clemesha
  • 1,908
  • 2
  • 12
  • 12
0

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.

Lazarus
  • 41,906
  • 4
  • 43
  • 54
0

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.