XPCOM - The Model

The Model

XPCOM is one of the main things making the Mozilla application environment an actual framework. It is a development environment that provides the following features for the cross-platform software developer:

  • Component management
  • File abstraction
  • Object message passing
  • Memory management

This component object model makes virtually all of the functionality of Gecko available as a series of components, or reusable cross-platform libraries, that can be accessed from the web browser or scripted from any Mozilla application. Applications that want to access the various Mozilla XPCOM libraries (networking, security, DOM, etc.) use a special layer of XPCOM called XPConnect, which reflects the library interfaces into JavaScript (or other languages). XPConnect glues the front end to the C++ or C programming language-based components in XPCOM, and it can be extended to include scripting support for other languages: PyXPCOM already offers support for Python, PerlConnect and plXPCOM provide support for Perl, and there are efforts underway to add CLI and Ruby language support for XPConnect.

On the developer side, XPCOM lets you write components in C++, C, JavaScript, Python, or other languages for which special bindings have been created, and compile and run those components on dozens of different platforms, including these and others where Mozilla itself is supported.

The flexibility to reuse the XPCOM components from the Gecko library and develop new components that run on different platforms facilitates rapid application development and results in an application that is more productive and easier to maintain. The networking library, for example, is a set of XPCOM components that can be accessed and used by any Mozilla application. File I/O, security, password management, and profiles are also separate XPCOM components that programmers can use in their own application development.

Read more about this topic:  XPCOM

Famous quotes containing the word model:

    Socrates, who was a perfect model in all great qualities, ... hit on a body and face so ugly and so incongruous with the beauty of his soul, he who was so madly in love with beauty.
    Michel de Montaigne (1533–1592)

    Your home is regarded as a model home, your life as a model life. But all this splendor, and you along with it ... it’s just as though it were built upon a shifting quagmire. A moment may come, a word can be spoken, and both you and all this splendor will collapse.
    Henrik Ibsen (1828–1906)