?? x217.htm
字號:
<HTML
><HEAD
><TITLE
>The Software</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
"><LINK
REL="HOME"
TITLE="Programming Jabber"
HREF="book1.htm"><LINK
REL="UP"
TITLE="Preface"
HREF="c7.htm"><LINK
REL="PREVIOUS"
TITLE="What's Inside"
HREF="x151.htm"><LINK
REL="NEXT"
TITLE="Conventions Used in This Book"
HREF="x270.htm"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming Jabber</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x151.htm"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 1. Preface</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x270.htm"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="JABTDG-PREFACE-SECT-5"
>The Software</A
></H1
><P
>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
<A
HREF="http://dev.jabber.org"
TARGET="_top"
>http://dev.jabber.org</A
>.
The installation instructions for the libraries can be found in the
library packages themselves.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="JABTDG-PREFACE-SECT-9.1"
>Java</A
></H2
><P
>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).</P
><P
><I
CLASS="EMPHASIS"
>JabberBeans</I
> 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.</P
><P
>The <I
CLASS="EMPHASIS"
>JabberBeans</I
> library can be obtained from
<A
HREF="http://jabberbeans.org"
TARGET="_top"
>http://jabberbeans.org</A
>.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="JABTDG-PREFACE-SECT-9.2"
>Perl</A
></H2
><P
>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.</P
><P
>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.</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="LITERAL"
>Net::Jabber</TT
></DT
><DD
><P
>This module is available on the
Comprehensive Perl Archive Network (CPAN). <TT
CLASS="LITERAL"
>Net::Jabber</TT
>
<A
NAME="AEN240"
HREF="#FTN.AEN240"
>[1]</A
>
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.</P
><P
>It relies upon a companion module <TT
CLASS="LITERAL"
>XML::Stream</TT
>,
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.</P
></DD
><DT
><TT
CLASS="LITERAL"
>Jabber::Connection</TT
></DT
><DD
><P
>The <TT
CLASS="LITERAL"
>Jabber::Connection</TT
> module is available at
<A
HREF="http://www.pipetree.com/jabber/"
TARGET="_top"
>http://www.pipetree.com/jabber/</A
>
and provides the same basic features as <TT
CLASS="LITERAL"
>Net::Jabber</TT
>
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
<TT
CLASS="LITERAL"
>Jabber::NodeFactory</TT
>, 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.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="JABTDG-PREFACE-SECT-9.3"
>Python</A
></H2
><P
>The Python examples have been written with Python 2.0.</P
><P
><I
CLASS="EMPHASIS"
>JabberPy</I
> 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 <TT
CLASS="LITERAL"
>Net::Jabber</TT
> library set,
<I
CLASS="EMPHASIS"
>JabberPy</I
> provides its feature set from two separate
libraries—<TT
CLASS="LITERAL"
>Jabber</TT
>, which provides connectivity,
authorization and callback functions like <TT
CLASS="LITERAL"
>Net::Jabber</TT
>
and <TT
CLASS="LITERAL"
>Jabber::Connection</TT
>, and <TT
CLASS="LITERAL"
>XMLStream</TT
>
which provides the basic connectivity and parsing functions like
<TT
CLASS="LITERAL"
>Net::Jabber</TT
>'s companion <TT
CLASS="LITERAL"
>XML::Stream</TT
>.</P
><P
>The <I
CLASS="EMPHASIS"
>JabberPy</I
> libraries are available from its
project site, at
<A
HREF="http://sourceforge.net/projects/jabberpy"
TARGET="_top"
>http://sourceforge.net/projects/jabberpy</A
>.</P
></DIV
></DIV
><H3
CLASS="FOOTNOTES"
>Notes</H3
><TABLE
BORDER="0"
CLASS="FOOTNOTES"
WIDTH="100%"
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN240"
HREF="x217.htm#AEN240"
>[1]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>at <A
HREF="http://www.cpan.org"
TARGET="_top"
>http://www.cpan.org</A
></P
></TD
></TR
></TABLE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x151.htm"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.htm"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x270.htm"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>What's Inside</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c7.htm"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Conventions Used in This Book</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -