Xpcom
2008
XPCOM is, currently, a core Mozilla technology. Developers use XPCOM for a variety of reasons, many of which result in XPCOM components being accessed from JavaScript. XPCOM uses IDL to describe interfaces. This can make XPCOM components a bit rigid and not feel right in JavaScript. Recent support for optional parameters in IDL has helped a little. Another helpful concept is using JavaScript functions in place of an IDL callback interface. For example:
Firefox 3 is not even out the door, but work has started on the next refactoring of the Mozilla platform. Dubbed Mozilla 2 (FF3 is built on Mozilla 1.9), it is a chance to make lots of interesting, even scary, changes to the platform. For some background on Mozilla 2 go back and read Brendan’s post. Also, read the Mozilla 2 wiki pages.
Firefox 3 is using JSON to store data in several places - such as bookmark backups, session restore, and offline manifests. Originally, JSON parsing was scattered through the code. Then it was consolidated to JSON.jsm, a JavaScript code module. Eventually, it was converted into nsIJSON.idl, a C++ XPCOM Component. What does this mean to extension and application developers? Well, you now have access to JSON encoding and decoding routines that can be a lot faster (more in a bit) than the JavaScript counterparts.
The extension breaking changes made to the Firefox 3 toolbar IDs has been reverted and patched to get the same result in a different way. Any extensions that broke in a nightly version of Firefox 3 should be working correctly now. We also made sure to get the fix into Firefox 3 beta 3. Big “thank you” goes out to Dave, Dão and Gavin for helping me get the patch right and to Connor and Beltzner for making this a critical enough to get into Beta 3.
I have talked a bit about the new built-in datasources (XML and SQL) developers can use with XUL templating (guide and tutorial). I wanted to wrapup my little foray into XUL template datasources by also talking about custom datasources.
2007
I have been working on a small project that ports Python’s ctypes functionality to Mozilla’s XPCOM system. For those unfamiliar with ctypes, its a Python module that allows developers to declare and call exported methods from binary/shared libraries. Developers can then wrap these binary calls in pure Python.
Today ActiveState announced the Open Komodo Project, an initiative to create an open source platform for building developer environments. The project overview has lots of information on the details. Here is a good summary: