powered by Jive Software

Any chance that Smack and Messenger/Whack will converge on org.xmpp.packet?

Or vica versa?

I can’'t send a org.xmpp.packet.Packet to a XMPPConnection#sendPacket(Packet) method and there is no easy way to wap between the two.

Perhaps a Utility class that can covert oneway or the other taking the raw dom4j element as a parameter.


A conversion utility is probably the right approach to start. I like the idea of switching to org.xmpp.packet in Smack at some point in the future. The major downside is that it creates a Dom4J dependency, which is a heavy burden considering that Smack is just 100K at the moment.


What about using the standard JAXP and XPath in Java 5.0? Wouldn’‘t this be sufficient or is there a feature that is a must have in dom4j that doesn’'t existing in 5.0?



That would probably mean exposing the raw XML of the packet as DOM? That would certainly be possible… but man do I hate that API.


Hate in what sense? Performance or development? It would help bridge the gap between the two apis if a common representation (or a pluggable representation) could be found


Message was edited by:

noahcampbell - fixed some spelling mistakes

Performance or development?

Both. But, it’‘s mainly the API that I despise – very awkward to use compared to Dom4J. Still, I definitely agree with you that it would make interop very simple. I’'ll have to think about it some more…


I agree, DOM is awkward. Performance wise, I think that any modifications should be done under a test framework with an eye towards execution time. Sometimes ugly runs like the devil ;). Is there an existing test framework that we can leverage in smack and/or whack (I think that’'s where the org.xmpp packages live).


Just some food for thought…or my need for speed ;).

I found this comparison between all the different xml parsers:

http://www.asciiarmor.com/blog/default/2004/11/13/38913ACE763A57A646F07BEF0C13CE 52.txt

The results: Jaxon is the slowest out of the bunch. I’‘ve probably invoked the Jaxon deities into a flamewar, but I’'m just paraphrasing when is already stated in the above link.

Curious why JDOM wasn’'t in the mix, I jump to their FAQ and found this entry: http://www.jdom.org/docs/faq.html#a0160.

Hmmm…perhaps it wouldn’‘t hurt to re-evaluate the use of jdom and favor it’'s uglier siblings.