[jdev] Re: design of library APIs
Pete Birkinshaw
pete at binary-ape.org
Mon Sep 13 14:53:01 CDT 2004
jdev-request at jabber.org wrote:
>
> Today's Topics:
>
> 1. design of library APIs (Lucas Nussbaum)
> Hi,
>
> I am considering writing yet another library for Jabber, this one in
> Ruby. I'd like to allow easy migration from other libraries, so I'd like
> to know which library I should use as an example.
>
> Which are the libraries known to have a good API design, for both client
> and component, and low-level and high-level handling of the protocol ?
>
> Thank you,
Hi,
Jabber::Connection, (Perl) appeals to me for server side stuff. It's
very light: it handles the connections and callbacks, and everything
else is done by processing the XML. Jabber/XMPP content is really just
XML, after all. Jabber::Connection comes with Jabber::NodeFactory, which
is a nice little XML library.
If you wanted to write a more complete API you could always layer it
over a simple library like this.
Jabber::Connection hasn't been updated for a while, and you'll need
the latest version from here:
<http://www.pipetree.com/jabber/jabberconnection/>
I'm not sure if one Library/API will be suitable for both server-side
and client-side programs. For clients I actually prefer Net::Jabber,
because with clients there's more non-protocol work to do, and
Net::Jabber lets me get on with that.
Pete.
--
Pete Birkinshaw
------------------------------------------------------
More information about the JDev
mailing list