Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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 provide at least 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 web site, http://dev.jabber.org. The installation instructions for the libraries can be found in the library packages themselves.
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 used in this book. 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 script and the Jabber server.
The JabberBeans library can be obtained from http://jabberbeans.org. The version used in this book is 0.9.0-pre4.
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.
Two libraries are available for programming Jabber solutions in Perl. Both come in the form of installable modules and are of the object-oriented persuasion.
Net::Jabber
This module is available on the Comprehensive Perl Archive Network (CPAN), at http://www.cpan.org. Net::Jabber 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.
The version of Net::Jabber used in this book is 1.0022. The corresponding version of XML::Stream used is 1.12.
Jabber::Connection
The Jabber::Connection module is available on CPAN and provides the same basic features 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 modulecalled 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.
The version of Jabber::Connection used in this book is 0.02.
The Python examples have been written with Python 2.0.
Jabberpy is the name of the Python Jabber library 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 such as Net::Jabber and Jabber::Connection, and xmlstream, which provides the basic connectivity and parsing functions such as Net::Jabber's companion XML::Stream.
The Jabberpy libraries are available from its project site, at http://sourceforge.net/projects/jabberpy.
The version of Jabberpy used in this book is 0.2.