phil wilson :: a geek commodity

12:02 AM

permanent link to post  

Wednesday, December 03, 2003

Is Mozilla Development too hard? asks Ken Walker. Neil’s reaction is Not really, and points to the more than 100 extensions developed, but as the author of XUL Planet he’s also probably slightly biased. :) The real answer, of course, is “yes”.

I’m extraordinarily keen to develop applications with Mozilla. I would absolutely love to be able to write an application which used XUL as its front end, giving me a nice, cross-platform interface. I’ve put a lot of time and effort into various Java solutions: Swing, SWT, XWT, Thinlet, Jelly, but none have been completely satisfactory, always letting me down in some way or another.

As you can tell, my programming language of choice is Java, and for me RDF and XUL aren’t a problem, in fact I positively embrace both of them, but I have no idea at all of how to link a Java app to an XUL front end except by means of a web service which I can call from Javascript!

I have a vague idea that JNI exists and would probably be useful here (as, most likely, would XPIDL and XPCOM), but whilst I understand how to make calls between basic C++ and Java apps using JNI, I have absolutely no idea how this relates in the real world to Mozilla, or even would relate to a GRE or XRE.

I'm pretty sure that XPCOM is the crux of the thing, but even that has more than one front page on the Mozilla site: XPCOM the project, and XPCOM the architecture. In all fariness, the XPCOM architecture page looks great, and seems to link to some good resources, but I swear I'd not seen half of them before, and am going to put down this new discovery to the reworking of mozilla.org ;)

But regardless, there's too much text and not enough code. What I need is a simple example of how I can take input from the user in XUL, pass it back to my Java code which updates the user interface. If only Creating Applications with Mozilla told me! Newsmonster, for example, is written wholly in Java (AFAIK!) and so it’s clearly possbile, but god knows how it’s done – I certainly haven’t been able to find any examples of how to get started. I also know about the Blackwood project, the aim of which is: “Creating a bridge between the Java Platform and Mozilla”, but a quick look at the checkins shows nothing’s happened since Jan 2002!

All of which means that I’m sitting here, full of enthusiasm and verve, and I have no idea of how to even start.

Who can point me in the right direction?