📄 x760.htm
字号:
<HTML
><HEAD
><TITLE
>Custom Clients</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="Inside Jabber"
HREF="c445.htm"><LINK
REL="PREVIOUS"
TITLE="Component/Service Architecture"
HREF="x712.htm"><LINK
REL="NEXT"
TITLE="XML-RPC and SOAP"
HREF="x775.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="x712.htm"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 2. Inside Jabber</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x775.htm"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="JABTDG-CH-2-SECT-2.7"
>Custom Clients</A
></H1
><P
>Earlier in this chapter we discussed features of 'off the shelf' clients
such as WinJab and Jarl, clients that natively support the headline
<TT
CLASS="LITERAL"
><message/></TT
> element. Considering this, in
combination with the features we know Jabber posesses, and the
solution potential that these features offer in presenting a wider deployment
vista than IM services, we come to an interesting conclusion:</P
><A
NAME="AEN764"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>A Jabber client is a piece of software that implements
as much of the Jabber protocol as required to get the job done.</P
></BLOCKQUOTE
><P
>What does this mean? WinJab supports a Jabber feature called
<I
CLASS="EMPHASIS"
>browsing</I
>
(see later in this chapter), Jarl supports connections to the server
via an HTTP proxy. Some clients merely support a limited subset of Jabber
as we know it; for example the client sjabber supports only the conferencing
features of Jabber. (As a somewhat biased observer, I would
of course call this "extremely focused"). </P
><P
>Our definition of a Jabber client deliberately omits any mention of a
user interface
(let alone a GUI!). Indeed, human interaction in a Jabber solution is
only an assumption formed from the hangover of the IM idea. Various efforts
are underway to use Jabber as a transport for A2A
messaging—the Jabber As Middleware (JAM) project is one such effort;
<A
NAME="JABTDG-CH-2-FOOTNOTE-8"
HREF="#FTN.JABTDG-CH-2-FOOTNOTE-8"
>[1]</A
>
an extension to the Perl libraries for Jabber (Net::Jabber) to carry
XML-RPC-encoded messages also exists.
<A
NAME="JABTDG-CH-2-FOOTNOTE-9"
HREF="#FTN.JABTDG-CH-2-FOOTNOTE-9"
>[2]</A
> </P
><P
>So, a Jabber client doesn't <I
CLASS="EMPHASIS"
>need</I
> to follow any
particularly conventional model, except if you're developing an IM
client, of course, and even then, flexibility and fitness for purpose
is key. We will see this philosophy in action in Part II of the book,
where we develop just enough Jabber client code to be able to connect
to a server, authenticate, and deal with one-way alert-style messages.
This is a key idea: you use as much, or as little, of what Jabber
has to offer to build your solutions. This doesn't just refer to the
Jabber building blocks, but also to the existing software, in particular
the clients.
For example,
if you wanted to develop a Jabber IM-based approval cycle workflow process
you could carry the approval data in a custom namespace-qualified message
extension. In this case, you're going to have to build a custom
client to interpret
that extension. However, if you carry the approval data inside the
body of a normal message then you can more or less take your pick of
ready-made clients. Furthermore, if you include URLs in the message body
—which many graphical clients can render into an active link—
you can easily bind in the power of existing web-based interactivity
to complete the solution.</P
></DIV
><H3
CLASS="FOOTNOTES"
>Notes</H3
><TABLE
BORDER="0"
CLASS="FOOTNOTES"
WIDTH="100%"
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.JABTDG-CH-2-FOOTNOTE-8"
HREF="x760.htm#JABTDG-CH-2-FOOTNOTE-8"
>[1]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>XXX where JAM exists</P
></TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.JABTDG-CH-2-FOOTNOTE-9"
HREF="x760.htm#JABTDG-CH-2-FOOTNOTE-9"
>[2]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
>XXX where Net::Jabber::XMLRPC exists</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="x712.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="x775.htm"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Component/Service Architecture</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c445.htm"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>XML-RPC and SOAP</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -