Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
XPCOM
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Component model}} '''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) and [[System Object Model|system object model]] (SOM). It features multiple [[language binding]]s and [[interface description language]] (IDL) descriptions, which allow programmers to plug their custom functions into the framework and connect them with other components. The most notable use of XPCOM is within the [[Firefox]] web browser, where many internal components interact through 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> ==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 * [[Message passing|Object message passing]] * [[Memory management]] This component object model makes virtually all of the functionality of [[Gecko (layout engine)|Gecko]] available as a series of components, or reusable cross-platform [[software library|libraries]], that can be accessed from the [[web browser]] or scripted from any Mozilla application. Applications that must access the various Mozilla XPCOM libraries ([[Computer network|networking]], [[Computer security|security]], [[Document Object Model|DOM]], etc.) use a special layer of XPCOM called [[XPConnect]], which [[Reflection (computer programming)|reflects]] the library interfaces into [[JavaScript]], or other languages. XPConnect glues the front end to the [[C++]], [[C (programming language)|C]], or [[Rust (programming language)|Rust]] programming language based components in XPCOM, and it can be extended to include scripting support for other languages: PyXPCOM<ref>{{Cite web |url=https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_bindings/PyXPCOM |title=PyXPCOM |access-date=2018-01-02 |archive-date=2020-10-20 |archive-url=https://web.archive.org/web/20201020073948/https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_bindings/PyXPCOM |url-status=dead }}</ref> already offers support for [[Python (programming language)|Python]]. wxWidgets<ref>{{usurped|1=[https://web.archive.org/web/20240402042937/https://gravitechdreams.com/blog/category/desktop-application-development-a-guide-to-powerful-cross-platform-options/ Perl Based Cross Platforms Developments]}}</ref> provide support for [[Perl]], and there are efforts underway to add [[Common Language Infrastructure]] (CLI) and [[Ruby (programming language)|Ruby]] language support for XPConnect. For developers, XPCOM allows writing components in [[C++]], [[C (programming language)|C]], [[JavaScript]], [[Python (programming language)|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== XPCOM adds a lot of code for [[Marshalling (computer science)|marshalling]] objects, and in the [[Netscape]] era XPCOM was overused for internal interfaces where it wasn't truly necessary, resulting in [[software bloat]].<ref>{{cite web |url = https://arstechnica.com/information-technology/2004/06/collins-interview/2/ |title = Ars Technica sits down with Scott Collins from Mozilla.org |author = Jorge O. Castro |publisher = Ars Technica |date = 2004-06-15 |access-date=2017-02-16}}</ref> This was a key reason why in 2001 [[Apple Inc.|Apple]] forked [[KHTML]], not Gecko, to create the [[WebKit]] [[browser engine|engine]] for its [[Safari (web browser)|Safari]] browser.<ref>{{cite web|url=http://news.cnet.com/2100-1023-980492.html |archive-url=https://web.archive.org/web/20121025015655/http://news.cnet.com/2100-1023-980492.html |title=Apple snub stings Mozilla |author=Paul Festa |publisher=[[CNET Networks]] |date=2003-01-14 |archive-date=2012-10-25 |access-date=2017-02-16 |author-link=Paul Festa |url-status=dead }}</ref> Mozilla has since cleaned up some of the XPCOM bloat.<ref>{{cite web | url= https://wiki.mozilla.org/Gecko:DeCOMtamination | title= Gecko:DeCOMtamination}}</ref> By 2008, this combined with other efforts resulted in big performance improvements for [[Gecko (software)|Gecko]].<ref>{{cite web |url =https://arstechnica.com/information-technology/2008/09/mozilla-committed-to-gecko/ |author = Ryan Paul |title = Why Mozilla is committed to Gecko as WebKit popularity grows |date = 2008-09-09 |access-date=2017-02-16}}</ref> <!--Note: this section is NOT about add-on support, it's about core browser functionality. So don't add Firefox 57 or similar info here; that's already sufficiently covered in the lede.--> ==References== {{Reflist}} ==External links== *[https://www-archive.mozilla.org/projects/xpcom/book/cxc/html/appb XPCOM API Reference] *[https://firefox-source-docs.mozilla.org/xpcom/index.html XPCOM Documentation] *[http://www.codeproject.com/Articles/87465/A-Simple-XPCOM-Tutorial A Simple XPCOM Tutorial] {{Mozilla projects}} {{DEFAULTSORT:Xpcom}} [[Category:Application programming interfaces]] [[Category:Mozilla]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Mozilla projects
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Usurped
(
edit
)