The Software

The recipes in this book come in varying flavors, some in Perl, some in Python, and some in Java. These examples—to a greater or lesser degree—make use of prewritten libraries that at least provide the basic services needed to connect to a Jabber server and exchange data with it. Here's a summary of the versions of the languages used in this book, along with those libraries that are used, what features they offer, and where they're available. In addition, references to all of these libraries can be found on the Jabber development website http://dev.jabber.org. The installation instructions for the libraries can be found in the library packages themselves.

Java

The Java recipes in this book are written in Java 2 (J2SE - the Java 2 Standard Edition), specifically with the 1.3.1 version of the Java Development Kit (JDK).

JabberBeans is the name of the Java library for Jabber. It offers comprehensive coverage of the features needed to write programs that interact with Jabber servers: connection, authentication, and the management of Jabber elements passed between your program and the Jabber server.

The JabberBeans library can be obtained from http://jabberbeans.org.

Perl

The recipes have been built and tested with Perl 5.6.0, although earlier and later versions of release 5 will probably work just fine.

There are two libraries available for programming Jabber solutions in Perl. They both come in the form of installable modules, and are both of the object-oriented persuasion.

Net::Jabber

This module is available on the Comprehensive Perl Archive Network (CPAN). Net::Jabber [1] provides basic functionality for connecting to and interacting with a Jabber server, in addition to a host of higher level features for manipulating all of the Jabber elements and making use of standard and custom namespaces.

It relies upon a companion module XML::Stream, also available on CPAN, that provides the underlying mechanisms for creating connections to a Jabber server, as well as sending, receiving, and interpreting (parsing) the fragments of conversation between your script and that Jabber server.

Jabber::Connection

The Jabber::Connection module is available at http://www.pipetree.com/jabber/ and provides the same basic features as Net::Jabber does, albeit in a more 'RISC' (Reduced Instruction Set Computing) way. While it provides similar functionality for connecting to and exchanging data with a Jabber server, it offers, via a companion module called Jabber::NodeFactory, a lower-level API—similar to that in the Jabber server itself—for constructing and manipulating the Jabber elements. There are no high-level features; instead, you build your own using the building blocks that the module provides.

Python

The Python examples have been written with Python 2.0.

JabberPy is the name of the Python Jabber library project that supplies the libraries used in the Python recipes in this book. As with Perl's Net::Jabber library set, JabberPy provides its feature set from two separate libraries—Jabber, which provides connectivity, authorization and callback functions like Net::Jabber and Jabber::Connection, and XMLStream which provides the basic connectivity and parsing functions like Net::Jabber's companion XML::Stream.

The JabberPy libraries are available from its project site, at http://sourceforge.net/projects/jabberpy.

Notes

[1]

at http://www.cpan.org