For programmers: why I use XUL
16/03/2003 - I discovered XUL some months ago, when I found the O'Reilly's book "Creating Applications with Mozilla", freely available at http://books.mozdev.org/. I started to read the book and I understood that in my daily web development I could use all widgets I'm used to have in desktop applications. When I develop Content Management System, Control Panel, and Web Administrative tools, I find myself spending a lot of time designing the interface to reproduce the most basic widgets. Things like resizing the columns width of a data grid, make the application usable with the keyboard, scrolling result list with arrow keys, creating tab panels and so on, are not a so simple task in web development. I have to write or find somewhere a lot of javascript library and I waste my time in designing the basic interface when I want to focus on the business logic. I think web applications (that are a different things from public web site) should have a powerful user interface similar to the ones on desktop programs.
XUL have almost all widgets. You can customize them using simple CSS or the GUI inherit the browser theme. I remind you that Mozilla is not just a browser, but a complete framework for building cross-platform applications. A big part of Mozilla is made with the same technology you can use in web applications: Javascript, CSS, XUL.
Anyway, 5 hours later meeting XUL, I was able to develop the GUI for an existing CMS. I can completely separate the server logic from the client's one. I can get the record set from a database and automatically display them in a sortable list. I can POST data to the server, in the same way I use to do with HTML, but without any need to refresh the page.
I know what you are thinking: XUL works only in Mozilla/Netscape. Yes, that is true, but I think this to be a false problem. I'm talking about web applications I'm used to developing. These applications are addressed to well-defined target of people, such as customers who need to administer their web site, call centers who have to make reservations and have different platform (Win, Linux, Mac) around the country.
A lot of customers prefer web applications instead of desktop program because they don't have to install anything, they can use it from any computer with a browser, the update process is painless and web applications are faster to develop. By using the Mozilla framework I can maintain all these advantages, and furthermore having a GUI and features of a desktop application.
Another objection is: browsers have evolved and now you can do anything with DHTML. This is undisputable, but we need a more practical solution. The point is: how long does it take to develop a Rich Web Client Application in DHTML?
In this period I'm reading a lot of litterature about Rich Web Client Application and I have tried several XUL competitor: Java Web Start, IBM Sash, Flash MX, Internet Explorer DHTML and so on. I found XUL the faster way to develop web applications.
- First of all, I don't need to learn any new language and/or a completely new framework. I can use my Javascript, CSS, HTML, XML knowledge. More important is that I can reuse what I'm learning using the Mozilla framework in the tradition web development, because the technology is standard and open.
- Secondly, I can develop application that can run remotely and locally. MAB can be used on-line and locally without any need to change the code.
- Thirdly, in my humble opinion, XUL GUI are lighter and more responsive than the GUI created by the competitors.


