Rapid development of rich clients and browser extensions

If extension writers had to re-implement the HTTP protocol, page rendering, DOM API, and so on whenever they wanted to access a web page, there would be few browser extensions. Instead, Firefox provides a solid foundation for extension writers to build upon.

xmpp4moz follows the same principle and provides common infrastructure in the domain of instant messaging, so that extension and client writers can concentrate on the real value of their application. Examples of components in the infrastructure:

  • multiple IM sessions;
  • on-demand connection;
  • authentication;
  • accounts management;
  • presence and roster caching.

xmpp4moz exposes a minimal and almost transparent API to extension and client writers. Since XMPP is already a high-level, domain-specific language, xmpp4moz does not wrap or abstract it. The code below, for example, sends a message to the bob@server.org contact using the alice@server.org/Firefox account :

XMPP.send('alice@server.org/Firefox',
          <message to="bob@server.org"><body>hello!</body></message>);

The programmer does not need to learn the XMPP protocol and a library that abstracts it, only the former. When the XMPP protocol is extended, the programmer can immediately apply the new functionality, without waiting for a library to abstract it or building his or her own abstractions.

Read more about Developing browser extensions and other client-side applications?.

tag:delete