Now that you’ve become familiar with the various tools in the XMPP toolkit, let’s start to think about how you can use those tools to build an XMPP application (or XMPP-enable an existing application). In this chapter, we explore some of the thought processes underlying successful application development with XMPP. Then in Chapter 14, we illustrate these principles by building an application from the ground up.
Like any technology, XMPP has strengths and weaknesses. As legendary Internet protocol designer Marshall Rose once put it, you can build a good helicopter or you can build a good submarine, but you can’t build something that is both a good helicopter and a good submarine. Trying to use the same tool to solve every problem usually ends in disaster.
As we mentioned before, XMPP was designed to transmit numerous small snippets of XML data over a decentralized network in close to real time, with built-in presence and straightforward federation. This means that XMPP is not a panacea for all Internet usages and, thankfully, the Internet already has time-tested technologies you can use instead for other tasks: HTTP/HTML, BitTorrent, Real-time Transport Protocol, SMTP/POP/IMAP, Usenet, etc.
So when is XMPP a good choice? Here are some guidelines:
When you need information about network availability, i.e., presence
When you need to deliver “just-in-time” alerts and notifications instead of continually polling for updates
When you need ...