Jump to content

XPCOM: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Perl baed project are still developed Vai various C++ Libraries and Utitlies
Link to SOM instead to a section of it.
 
Line 1: Line 1:
'''Cross Platform Component Object Model''' ('''XPCOM''') is a [[cross-platform]] [[Component-based software engineering|component model]] from [[Mozilla]]. It is similar to Microsoft [[Component Object Model]] (COM) and [[Common Object Request Broker Architecture]] (CORBA).<ref>[[IBM System Object Model#Comparison of support for compiled class libraries|Comparison with COM, GObject, SOM, Objective-C, Windows Runtime]]</ref> It features multiple [[language binding]]s and [[interface description language]] (IDL) descriptions; thus programmers can plug their custom functions into the framework and connect it with other components.
'''Cross Platform Component Object Model''' ('''XPCOM''') is a [[cross-platform]] [[Component-based software engineering|component model]] from [[Mozilla]]. It is similar to [[Component Object Model]] (COM)[[Common Object Request Broker Architecture]] (CORBA)[[System Object Model| SOM It features multiple [[language binding]]s and [[interface description language]] (IDL) descriptions; thus programmers can plug their custom functions into the framework and connect it with other components.


The most prominent usage of XPCOM is within the [[Firefox]] web browser. Many of its internal components interact via XPCOM interfaces. Furthermore, Firefox used to allow [[Add-on (Mozilla)|add-ons]] extensive XPCOM access, but this was removed in 2017 and replaced with the less-permissive [[Browser extension#API conformity|WebExtensions API]].<ref>[https://www.mozilla.org/en-US/firefox/57.0/releasenotes/ Firefox 57 release notes]</ref><ref>{{cite web|title=The Future of Developing Firefox Add-ons|url=https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/|date=2015-08-21|author=Kev Needham|access-date=2018-04-02|website=blog.mozilla.org}}</ref> (Two [[Fork (software development)|forks]] of Firefox still support XPCOM add-on capability: [[Pale Moon (web browser)|Pale Moon]]<ref>{{cite web|url=https://www.palemoon.org/roadmap.shtml |title=Pale Moon future roadmap | access-date=2018-04-02 |publisher=[[Pale Moon (web browser)|Pale Moon]]}}</ref> and [[Basilisk (web browser)|Basilisk]].<ref>{{cite web|title=Pale Moon team releases first version of Basilisk browser|url=https://www.ghacks.net/2017/11/17/pale-moon-team-releases-first-version-of-basilisk-browser/|website=ghacks.net|date=2017-11-17|access-date=2018-04-02}}</ref>)
The most prominent usage of XPCOM is within the [[Firefox]] web browser. Many of its internal components interact via XPCOM interfaces. Furthermore, Firefox used to allow [[Add-on (Mozilla)|add-ons]] extensive XPCOM access, but this was removed in 2017 and replaced with the less-permissive [[Browser extension#API conformity|WebExtensions API]].<ref>[https://www.mozilla.org/en-US/firefox/57.0/releasenotes/ Firefox 57 release notes]</ref><ref>{{cite web|title=The Future of Developing Firefox Add-ons|url=https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/|date=2015-08-21|author=Kev Needham|access-date=2018-04-02|website=blog.mozilla.org}}</ref> (Two [[Fork (software development)|forks]] of Firefox still support XPCOM add-on capability: [[Pale Moon (web browser)|Pale Moon]]<ref>{{cite web|url=https://www.palemoon.org/roadmap.shtml |title=Pale Moon future roadmap | access-date=2018-04-02 |publisher=[[Pale Moon (web browser)|Pale Moon]]}}</ref> and [[Basilisk (web browser)|Basilisk]].<ref>{{cite web|title=Pale Moon team releases first version of Basilisk browser|url=https://www.ghacks.net/2017/11/17/pale-moon-team-releases-first-version-of-basilisk-browser/|website=ghacks.net|date=2017-11-17|access-date=2018-04-02}}</ref>)

Latest revision as of 20:12, 23 June 2024

Cross Platform Component Object Model (XPCOM) is a cross-platform component model from Mozilla. It is similar to Component Object Model (COM),Common Object Request Broker Architecture (CORBA) and system object model (SOM). It features multiple language bindings and interface description language (IDL) descriptions; thus programmers can plug their custom functions into the framework and connect it with other components.

The most prominent usage of XPCOM is within the Firefox web browser. Many of its internal components interact via XPCOM interfaces. Furthermore, Firefox used to allow add-ons extensive XPCOM access, but this was removed in 2017 and replaced with the less-permissive WebExtensions API.[1][2] (Two forks of Firefox still support XPCOM add-on capability: Pale Moon[3] and Basilisk.[4])

Model[edit]

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:

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 must 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++, C, or Rust programming language based components in XPCOM, and it can be extended to include scripting support for other languages: PyXPCOM[5] already offers support for Python. wxWidgets[6] provide support for Perl, and there are efforts underway to add Common Language Infrastructure (CLI) and Ruby language support for XPConnect.

For developers, XPCOM allows writing 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 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.

Past overuse[edit]

XPCOM adds a lot of code for marshalling objects, and in the Netscape era XPCOM was overused for internal interfaces where it wasn't truly necessary, resulting in software bloat.[7] This was a key reason why in 2001 Apple forked KHTML, not Gecko, to create the WebKit engine for its Safari browser.[8]

Mozilla has since cleaned up some of the XPCOM bloat.[9] By 2008, this combined with other efforts resulted in big performance improvements for Gecko.[10]

References[edit]

  1. ^ Firefox 57 release notes
  2. ^ Kev Needham (2015-08-21). "The Future of Developing Firefox Add-ons". blog.mozilla.org. Retrieved 2018-04-02.
  3. ^ "Pale Moon future roadmap". Pale Moon. Retrieved 2018-04-02.
  4. ^ "Pale Moon team releases first version of Basilisk browser". ghacks.net. 2017-11-17. Retrieved 2018-04-02.
  5. ^ PyXPCOM[dead link]
  6. ^ Perl Based Cross Platforms Developments
  7. ^ Jorge O. Castro (2004-06-15). "Ars Technica sits down with Scott Collins from Mozilla.org". Ars Technica. Retrieved 2017-02-16.
  8. ^ Paul Festa (2003-01-14). "Apple snub stings Mozilla". CNET Networks. Archived from the original on 2012-10-25. Retrieved 2017-02-16.
  9. ^ "Gecko:DeCOMtamination".
  10. ^ Ryan Paul (2008-09-09). "Why Mozilla is committed to Gecko as WebKit popularity grows". Retrieved 2017-02-16.

External links[edit]