[Adium-devl] Java-based libraries... a ponder, a thought, an apology

Andreas Monitzer soc at monitzer.com
Fri Dec 8 14:58:32 UTC 2006


On Dec 08, 2006, at 05:10, Christopher Forsythe wrote:

> Do we know where the problems with libgaim's implementation are
> (adium or gaim code) and if those would be easier to correct?

Well, I don't know much about the libgaim-based code, but I've heard  
on the channel that it lacks a proper XML parser, which is essential  
in XMPP. The implementation as it is right now is totally basic, it's  
just messaging and presence, nothing of those XEPs. Adding all that  
stuff would probably be just as much work as writing a new library.

On Dec 08, 2006, at 07:13, Peter Hosey wrote:
> I understand Jabber has other little goodies (e.g. pub/sub) that  
> might be useful in a generic framework that non-IM applications  
> could use.

That's true, pubsub is a generic algorithm for services like blogs or  
news sites. However, I haven't seen it in use anywhere, but that  
could change some time in the future.
btw, the personal eventing protocol I was talking about is a  
simplified standard for pubsub for IM needs (for subscribing to one's  
avatar image for example).

On Dec 08, 2006, at 07:34, Colin Barrett wrote:
> I'm not sure the advantage of doing it in ObjC when there are plenty
> of other ones. Also, 3 months to get a working, stable, tested XMPP
> library? Call me Thomas, but I'm doubtful. Also, even though it's in
> ObjC doesn't mean it would necessarily be easier to maintain -- we
> don't know XMPP.

I didn't suggest ObjC because it'd be easier to maintain for you, but  
because it'd be easier to write for me :)
ObjC has a lot of features that are simply missing in C or C++, but  
make implementing dynamic protocols like XMPP much easier.

Btw, I could reuse most of the UI-level stuff of my old plugin, so I  
wouldn't have to implement everything from scratch.

> I'd suggest using an existing C library. http://www.imendio.com/ 
> projects/loudmouth/
>    Looks good, from just a quick search.

Just look at the extensive class list:
http://developer.imendio.com/api/loudmouth/ch01.html

Oh my god, it supports sending messages! :)

 From the FAQ http://developer.imendio.com/projects/loudmouth/faq
Is Loudmouth XMPP-compliant

Unfortunately Loudmouth doesn't yet fully support the new XMPP  
standard. This is something that is planned for version 2 of the  
library.

("new" as in "a few years old")

If you really want to go library-based, I'd vote for iksemel, since  
that's basically a C-based streaming XML parser. However, having the  
whole packet in an NSXMLNode would be very convenient for higher- 
level programming.

> (alternatively, Python and Ruby are alright too, as those bridges are
> quite well supported: http://developer.apple.com/leopard/overview/ 
> apptech.html
>   )

They might be right now, but will they be in the future? Apple seems  
to support whatever is cool at the moment, and drop it as soon as  
it's inconvenient for them. On 10.0, Java was the big way to go, and  
many folks even feared that they'll drop ObjC in favor of it. Both  
Python and Ruby are well-hyped right now, and that's why Apple  
embraces them, but it's pretty much the same situation like with Java  
a few years ago.

>> I take it, then, that even two Java libraries does not justify JNI,
>> and therefore we're dropping Smack too?
>
> Two jabber libraries would mean two times the JNI, I think?

Not when implementing it, and at runtime, you'd use the same Java VM  
for them (that's the case right now anyways).

andy





More information about the devel mailing list