<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>The Dev Blog: Ruby and XMPP/Jabber - a Multi Posts Series, Part 1</title>
    <link>http://devblog.famundo.com/articles/2006/10/10/ruby-and-xmpp-jabber-a-multi-posts-series</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Putting Family Management on Rails!</description>
    <item>
      <title>Ruby and XMPP/Jabber - a Multi Posts Series, Part 1</title>
      <description>&lt;p&gt;Instant Messages is one of the most common apps running on people's desktops. And they have the nice feature of popping up when a new message comes in. Exploiting this programmatically can open up a huge array of options.&lt;/p&gt;

&lt;p&gt;In &lt;a href="http://www.famundo.com"&gt;Famundo&lt;/a&gt; we added the ability to send alarms notifications to IM addresses. The initial implementation was easy and pretty trivial, given all the samples I found. When I wanted to go further, it became complicated, and there were no more examples to look at. Things like sending rich text messages, or talking to other IM services through XMPP gateways. I promise to show how to just that (and other things) in this series of posts.&lt;/p&gt;

&lt;p&gt;I started with Jabber4R, but then realized it's not supported anymore, and all development is now done in &lt;a href="http://home.gna.org/xmpp4r/"&gt;XMPP4R&lt;/a&gt;. So I switched to it. It is a much more advanced library, and is pretty big. One of the prolems with it is the complexity. Part of it is the inherent complexity of the XMPP protocol. (Though I read somewhere it's simple, don't believe everything you read...)&lt;/p&gt;

&lt;p&gt;My goal in this series of posts is to guide you into using XMPP4R to send messages, subscribe to services, send queries, etc... I might get also into receiving messages, though I see it as less important for rails applications. We'll see how much time I have on my hands. If there's something specific you would like me to discuss - let me know.&lt;/p&gt;

&lt;p&gt;So lets get starting! &lt;/p&gt;

&lt;p&gt;XMPP is a messaging protocol based on XML messages passed between clients and servers. Better known as &lt;em&gt;THE&lt;/em&gt; open source for instant messaging protocol/server, is also the protocol used by GoogleTalk. there are also public servers you can subscribe to and use freely. With the right gateways it will let you send messages to all the other major IM networks (AIM, ICQ, MSN and YM). You can read all about it &lt;a href="http://www.jabber.org"&gt;here&lt;/a&gt;. The protocol is described in a large collection of RFCs/JEPs and as those usually are, it's a bit of work to decipher them. But I do recommend reading atleast some of them. Depending on what you are trying to achieve. &lt;/p&gt;

&lt;p&gt;Another good option are the Jabber/XMPP related books. But be warned they are not that complete, and are not Ruby based. The two I have are Java based:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.oreilly.com/catalog/jabber/index.html"&gt;Programming Jabber&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.manning.com/shigeoka/"&gt;Instant Messaging in Java&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;The following installments will be:&lt;/h3&gt;

&lt;p&gt;Part 2: Logging in and sending simple messages to a Jabber/XMPP server&lt;/p&gt;

&lt;p&gt;Part 3: Adding html to the messages&lt;/p&gt;

&lt;p&gt;Part 4: Queries + Callbacks&lt;/p&gt;

&lt;p&gt;Part 5: Presence, or here I am!&lt;/p&gt;

&lt;p&gt;Part 6: Sending messages to proprietary networks (AIM, ICQ, MSN, YM)&lt;/p&gt;

&lt;p&gt;Tune in for more....&lt;/p&gt;</description>
      <pubDate>Tue, 10 Oct 2006 16:24:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:187b03aa-b961-45b9-a6e4-15b44bbc5439</guid>
      <author>guy.naor@famundo.com (Guy Naor)</author>
      <link>http://devblog.famundo.com/articles/2006/10/10/ruby-and-xmpp-jabber-a-multi-posts-series</link>
      <category>XMPP4R/Jabber</category>
      <category>Rails</category>
      <category>Ruby</category>
      <trackback:ping>http://devblog.famundo.com/articles/trackback/51</trackback:ping>
    </item>
  </channel>
</rss>
