Roadmap for XPCOM, XPConnect, XPTCall, and XPIDL
XPCOM is a lightweight cross platform COM work-alike. It provides
interfaces, factories, reference counting, QueryInterface based 'casting',
auto pointers, and various other useful stuff. It is the foundation for
modularity in mozilla.
see:
Main xpcom page
Source code in mozilla/source/xpcom
XPConnect is a service that facilitates calling between native code and
JavaScript. It does this by dynamically building 'wrapper' objects to allow
virtually transparent use of foreign objects. It uses no generated code. For
normal cases no restrictions are placed upon the participating objects except
that their interfaces must have been declared in the XPIDL interface definition
language and they must follow the rules and conventions of XPCOM.
XPConnect features
- Transparent calling across language boundaries.
- Automatic mapping between reference counting and garbage collection.
- Typelib based - no generated code. Typelibs are cross platform.
- Mapping between XPCOM 'out' params and JS return values.
- Automatic type conversions of params and result (with automatic wrapper creation as needed).
- Support for specialized JavaScript behavior using nsIXPCScriptable.
- Normal vtbl based interfaces usage - no IDispatch or dual interfaces.
- Single declaration of interfaces in XPIDL for headers and typelibs.
- Support for multiple interfaces per object.
- Reflection of XPCOM object repository into JavaScript.
- Support for arbitrary JS properties on wrapped native xpcom objects.
see:
Main XPConnect page
Source code in mozilla/source/js/src/xpconnect/
XPTCall is a library that supports both invoking methods on arbitrary
xpcom objects and implementing classes whose objects can impersonate any
xpcom interface. It does this using platform specific assembly language code.
XPTCall is required by XPConnect and must be ported to any platform on which
XPConnect (and some other mozilla code which also uses XPTCall) will run.
see:
XPTCall FAQ
Source code in mozilla/source/xpcom/reflect/xptcall/
XPIDL is yet another interface definition language. XPIDL is also the
name of the compiler that compiles xpidl files. The syntax is based on CORBA.
Some extensions have been added. Many CORBA features are not supported. The
compiler generates C++ headers and typelibs. At some future point Javadoc-like
interface documentation will also be produced by the tool.
There is a linker (xpt_link) to merge typelib files and a dump utility
(xpt_dump) to display their contents in human readable form.
see:
Main XPIDL page
Source code in mozilla/source/xpcom/typelib/
Author: John Bandhauer <jband@netscape.com>
Last modified: 7 November 2000
Modified by: Mike Ang <mang@subcarrier.org>