creating applications with mozilla

By anders pearson 20 Sep 2002

O’Reilly has released the entire text of the new book <a href=”http://books.mozdev.org/chapters/“>Creating Applications with Mozilla</a> online.

i’m pretty excited to see mozilla starting to turn into a real application platform. some of the projects at <a href=”http://www.mozdev.org/“>mozdev</a> and elsewhere show great promise. i’ve been playing around with the <a href=”http://www.mozilla.org/projects/calendar/“>mozilla calendar</a> a bit and i’m pretty impressed. it still crashes now and then and has plenty of bugs but is on the way to becoming a really decent calendar app.

since the vast majority of the programming i’ve done has been web-based stuff using html for the user interface, i’ve become very familiar and comfortable with using markup languages like html and xml along with display languages like css to design my interfaces. every once in a while when i decide to write a ‘regular’ GUI application, i have to struggle with the programmatic approach that various widget libraries (Tk, Gtk, qt, swing, etc) use for laying out the buttons and text boxes and such. html forms and user interface elements are very limited though and the stateless nature of http means that many standard desktop applications would be impossible or at least extremely difficult to develop as web applications.

so when mozilla started becoming usable and i first heard about <a href=”http://www.mozilla.org/xpfe/xulref/“>XUL</a>, mozilla’s XML based user interface language, i was pretty excited. you can think of it as basically html expanded so you can actually use it to design interfaces for real honest-to-goodness GUI apps. this kind of thing sounds like a much shallower learning curve for me than other technologies.

because it runs on top of mozilla and mozilla runs on just about every platform, it promises to be very portable. what i’m really excited about is using XUL to write really nice interfaces for client applications that talk to a server via XML-RPC or SOAP.

the only things that bother me about XUL at this point are that from skimming through the book, it looks incredibly verbose. easier to learn isn’t that important if it requires writing 10 times more code. maybe i’m just a spoiled perl programmer, but i’m rather fond of concise code. also it uses javascript as the language for specifying the actual logic of the application. after years of pulling out hair over javascript’s idiosyncrasies and often bizarre syntax (eg, the ‘functions as classes’ object model) it’s just left a bad taste in my mouth. maybe some day someone will figure out a way to use python/perl/scheme/etc to script XUL instead of javascript.

anyway, i should probably go out and actually try writing a simple XUL app or two before i say too much about it. and if i decide that i don’t like XUL, i guess there’s always <a href=”http://sjbrown.geeky.net/metagame-sector/tutorial.html”>python with libglade</a>…

Tags: programming mozilla xul user interfaces