Difference between revisions of "XMPP Programmer's Guide"
Neustradamus (talk | contribs) m |
Neustradamus (talk | contribs) m (Neustradamus moved page Jabber Programmer's Guide to XMPP Programmer's Guide) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
Welcome to | Welcome to XMPP Programmer's Guide. This wiki will help you to develop software for [http://xmpp.org/ XMPP] technologies. | ||
=== Mini-FAQ: Before we start there are some questions to clarify: === | === Mini-FAQ: Before we start there are some questions to clarify: === | ||
* '''What is | * '''What is XMPP?''' | ||
: The architecture of the XMPP network is similar to email while a XMPP server conforms an email server ('''server.com''') and XMPP clients conforms email clients ('''user@server.com'''). The difference is that everything happens (by definition: nearly) in realtime over a persistent XML-TCP stream. In example this makes it possible that other (authorized) users can see your online presence. In addition to that servers can offer specialised services, in example a user directory ('''users.server.com''') or a weather agent ('''weather.server.com'''). XMPP is the architecture/protocol the network is based on. | : The architecture of the XMPP network is similar to email while a XMPP server conforms an email server ('''server.com''') and XMPP clients conforms email clients ('''user@server.com'''). The difference is that everything happens (by definition: nearly) in realtime over a persistent XML-TCP stream. In example this makes it possible that other (authorized) users can see your online presence. In addition to that servers can offer specialised services, in example a user directory ('''users.server.com''') or a weather agent ('''weather.server.com'''). XMPP is the architecture/protocol the network is based on. | ||
* '''Is | * '''Is XMPP the right protocol/thing for me?''' | ||
: Do you want to exchange information over a distributed network with many clients instantly? Do you want something like email in realtime? Then it will be a good choice. | : Do you want to exchange information over a distributed network with many clients instantly? Do you want something like email in realtime? Then it will be a good choice. | ||
* '''What is the difference between Jabber and XMPP?''' | * '''What is the difference between Jabber and XMPP?''' | ||
: Since 2004 XMPP is the IETF-approved instant messaging and presence protocol. | : Since 2004, XMPP is the IETF-approved instant messaging and presence protocol. Jabber is the old name of XMPP that evolves since 1998. | ||
* '''Is it commercial or opensource?''' | * '''Is it commercial or opensource?''' | ||
: The | : The XMPP protocols are free, open, public, and easily understandable. | ||
* '''What is a XEP?''' | * '''What is a XEP?''' | ||
Line 22: | Line 22: | ||
* '''Do you have some tips and tricks for me?''' | * '''Do you have some tips and tricks for me?''' | ||
: Yes, sure, goto [[ | : Yes, sure, goto [[XMPP Programmer's Tips and Tricks]]. | ||
== Existing | == Existing XMPP code libraries == | ||
In many cases it will be sufficient to use one of the existing code libraries. Following this [http://xmpp.org/software/libraries.shtml link] you can find a list of available libraries for many platforms and programing languages. For programming beginners it is the best choice to use an existing XMPP code library. | In many cases it will be sufficient to use one of the existing code libraries. Following this [http://xmpp.org/software/libraries.shtml link] you can find a list of available libraries for many platforms and programing languages. For programming beginners it is the best choice to use an existing XMPP code library. | ||
Line 36: | Line 36: | ||
# Knowledge about [http://en.wikipedia.org/wiki/XML XML] and character encodings like [http://en.wikipedia.org/wiki/UTF-8 UTF-8]. | # Knowledge about [http://en.wikipedia.org/wiki/XML XML] and character encodings like [http://en.wikipedia.org/wiki/UTF-8 UTF-8]. | ||
# Knowledge about DOM and SAX. | # Knowledge about DOM and SAX. | ||
# Read the [[ | # Read the [[XMPP Programmer's Tips and Tricks]]. | ||
== How to start ... == | == How to start ... == | ||
First you must decide what you want to program. Basically you can program either a XMPP client, a XMPP server or a XMPP server component: | First you must decide what you want to program. Basically you can program either a XMPP client, a XMPP server or a XMPP server component: | ||
* [[Programming | * [[Programming XMPP Clients]] | ||
: Choose this if you want to create a client program. This program can be a normal chat program but is not limited to it. | : Choose this if you want to create a client program. This program can be a normal chat program but is not limited to it. | ||
* [[Programming | * [[Programming XMPP Server Components]] | ||
: In case you want to develop a new service for XMPP go here. There are several ways to accomplish this. | : In case you want to develop a new service for XMPP go here. There are several ways to accomplish this. | ||
* [[Programming/Extending | * [[Programming/Extending XMPP Servers]] | ||
: It is unlikely that you want to write a complete new server. It is more likely that you want to extend an extisting open source server project. Anyway here are some hints on how to start with this. | : It is unlikely that you want to write a complete new server. It is more likely that you want to extend an extisting open source server project. Anyway here are some hints on how to start with this. | ||
Latest revision as of 01:03, 17 December 2020
Introduction
Welcome to XMPP Programmer's Guide. This wiki will help you to develop software for XMPP technologies.
Mini-FAQ: Before we start there are some questions to clarify:
- What is XMPP?
- The architecture of the XMPP network is similar to email while a XMPP server conforms an email server (server.com) and XMPP clients conforms email clients (user@server.com). The difference is that everything happens (by definition: nearly) in realtime over a persistent XML-TCP stream. In example this makes it possible that other (authorized) users can see your online presence. In addition to that servers can offer specialised services, in example a user directory (users.server.com) or a weather agent (weather.server.com). XMPP is the architecture/protocol the network is based on.
- Is XMPP the right protocol/thing for me?
- Do you want to exchange information over a distributed network with many clients instantly? Do you want something like email in realtime? Then it will be a good choice.
- What is the difference between Jabber and XMPP?
- Since 2004, XMPP is the IETF-approved instant messaging and presence protocol. Jabber is the old name of XMPP that evolves since 1998.
- Is it commercial or opensource?
- The XMPP protocols are free, open, public, and easily understandable.
- What is a XEP?
- A XMPP Extension Protocol (XEP) defines standards for special tasks. For example XEP-0045 defines a standard for doing Multi-User Chat. You can find a complete list of all XEPs here. The wiki should help programmers to go straight forward without studying all the XEPs.
- What is a Jabber resource?
- A Jabber user account can be used from several resources (computers/applications) at the same time. This is indicated with a special name addition (user@server.com/resource) describing the resource, example: user@server.com/work
- Do you have some tips and tricks for me?
- Yes, sure, goto XMPP Programmer's Tips and Tricks.
Existing XMPP code libraries
In many cases it will be sufficient to use one of the existing code libraries. Following this link you can find a list of available libraries for many platforms and programing languages. For programming beginners it is the best choice to use an existing XMPP code library.
Considering that most libraries are limited to the functionality they export and many libraries are not up to date with current XEPs and XMPP standards an advanced programmer might prefere to write his/her own library. In fact with proper knowledge this is not that a complicate task. It can help a lot to get advice from someone who did this already.
What would you need to know to write your own XMPP library/code?
- Study this guide carefully ;)
- Knowledge about how to create a TCP socket, knowledge about TLS or SASL is an advantage.
- For GUI applications you should think about a good way to handle this socket.
- Knowledge about XML and character encodings like UTF-8.
- Knowledge about DOM and SAX.
- Read the XMPP Programmer's Tips and Tricks.
How to start ...
First you must decide what you want to program. Basically you can program either a XMPP client, a XMPP server or a XMPP server component:
- Choose this if you want to create a client program. This program can be a normal chat program but is not limited to it.
- In case you want to develop a new service for XMPP go here. There are several ways to accomplish this.
- It is unlikely that you want to write a complete new server. It is more likely that you want to extend an extisting open source server project. Anyway here are some hints on how to start with this.
Miscellaneous Guides
- A guide to creating SSL/TLS certificates for an XMPP server with the required fields in it.