Mozilla as a Development Platform: An Interview with Axel Hecht

by Edd Dumbill

Author's note: Axel Hecht is a member of Mozilla Europe's board of directors, and a major contributor to the Mozilla project, working on XSLT and RDF, among other things.

At O'Reilly's European Open Source Convention (October 17-20), Dr. Hecht will be talking about Mozilla as a development platform. O'Reilly Network interviewed Dr. Hecht to find out if the long-held dream of Mozilla as a development platform was about to come true.

Edd Dumbill: You're speaking about Mozilla as a platform at Euro OSCON. We've heard Mozilla presented as a platform for years, but it's never really happened properly. Why now?

Axel Hecht: Actually, I got involved with Mozilla back in 1999 when looking for a toolkit. Not that it actually was one back then, of course. It's really hard to find out which code is part of your platform and which code is part of your application, if you just have one platform and one application. With the shift of focus from the Mozilla Suite to the independent programs Firefox and Thunderbird, with Sunbird in the queue and of course Nvu, there is a much better testing field to find out which part is platform and which part is application.

On top of that, we still have to compete with software that most users have readily installed on their computer as it is delivered, so download size is a big argument. Thus factoring out the application-spanning parts and collecting them out into a platform, that we actually ship as a product, is a natural step and required to make Firefox and Thunderbird even better.

Axel Hecht
Mozilla as a Development Platform

O'Reilly European Open Source Convention

O'Reilly European Open Source Convention
17-20 October 2005
Amsterdam, The Netherlands

ED: Are there any recent technical changes that have helped Mozilla become a more viable platform?

AH: There is a considerable amount of energy going into XULRunner these days. This is the platform that we will port our applications to. We are going to start with Firefox, but there are already people actively using the IRC client Chatzilla as an XULRunner application. XULRunner will include Gecko and a set of other modules usable for application creation.

Writing an XULRunner application is as easy as writing a few text files, there is no compilation involved and for the most part, you don't have to ship any binary code besides XULRunner itself. Applications can readily use the localization support, theming, and even the extension manager and its back end. We already provide XULRunner nightlies, so people can test it.

Another semi-technical change is the growing amount of documentation on Devmo. It's wiki-based, and set up to support multiple languages. This is quite a big change for Mozilla to become a viable platform. If you're interested in XULRunner, I suggest you read the "Toolkit API" section. But there are more resources; XULPlanet is going to move its content over to Devmo, so there will be XUL and XPCOM references. There is an updated version of the old Netscape DevEdge content there, too, so you can check out the JavaScript guide and reference.

ED: We know Mozilla has a GUI toolkit in XUL, but what about the rest of the services that make a platform? Can you tell us about IO, networking, and databases?

AH: Anything you need to write an application is included in our platform. We need that, because we're writing applications ourselves. IO and networking work pretty similar for the most part. Using "necko," our network library, is commonly the best way to do IO. One of the cumbersome parts in IO is Mozilla's preference for asynchronous IO. Most people don't think that way, but I can only suggest you do use asynchronous IO whenever you can.

With respect to databases, I'm not the most proficient guy to talk about it. That said, there is mozStorage, which is based on SQLite. There is extensions/sql in the CVS repository, which has code to talk to SQLite, MySQL, and PosgreSQL, but that's not actively maintained and won't be part of XULRunner.

ED: Does programming for Mozilla mean we have to use JavaScript?

AH: No, you can use any language that has an XPCOM binding. I know those exist for Python, Perl, and Java. Mozilla itself is written in C++ and JavaScript. Our scripting security model is bound to JavaScript, though, and nice features like interface flattening are only exposed to JavaScript right now. There is ongoing work to enhance the support for other scripting languages such as Python. More information on the progress of this work can be found on the wiki and the bug reports linked there.

Pages: 1, 2

Next Pagearrow