xmppejabberdnode-xmpp

node-xmpp-server vs node-xmpp-client


I'm in the process creating sample chat app that need to works both in mobile and web with node application and ejabbered server using xmpp protocol.using xmpp protocol for the node-ejabbered connection I am facing confusion with the several modules node-xmpp-client and node-xmpp-server. I am new to this please anyone suggest which is to be used among 2 and correct me if i am wrong.

And what is the role of node-xmpp module if there is already 2 modules node-xmpp-client and node-xmpp-server.

please clear my confusion, I can't get clear thought with descriptions given in the other sites

Thanks


Solution

  • Both node-xmpp-client and node-xmpp-server are deprecated and the whole node-xmpp family as well.

    There is a separate https://github.com/xmppjs/xmpp.js which is a replacement for them.

    This library is good for the following things:

    So you can use this lib if you want to interract from all above environments with your Ejabberd server.

    Also, if we are talking about Web only - there is a good Web browser lib: http://strophe.im/strophejs/

    Also, if we are talking about native mobile, there are 2 XMPP libs for native iOS & Android:

    =====

    You do not need to use 'node-xmpp-server' at all. You already have an XMPP server (Ejabberd). You just need to interact with it from your mobile & web apps using above libs.

    If you are going to use some Native Script / Reeact Native for mobile apps development then you can use a single lib xmpp.js on both mobile and web apps. If you are going to use native iOS/Android SDK - then you need to use XMPPFramework & Smack on mobile and Strophe.js (or xmpp.js) on web.