Replacing DHTML Menus with XUL
Monday April 5th, 2004
Nigel McFarlane writes in with news about his latest article on using XUL rather than DHTML to create Web page menus: "I've written another article highlighting the features of Mozilla. To the best of my knowledge this is the first 'dirty XUL trick' that might appeal to web developers. It's nice to see that the Mozilla styling and layout systems are robust enough to support this kind of fiddling. It would be wonderful to see a full Web toolkit of XBL objects spring up to replace the junk we do in Dynamic HTML."
#5 Re: Let me get this straight
Tuesday April 6th, 2004 2:10 AM
You are replying to this message
Yes, they only work in Gecko. Yes, it is like MSHTML. Yes, using these in public Web pages would be going away from Web standards. XUL is not a W3C standard.
Personally I feel the use of XUL on the Web is in general a bad idea for several reasons.
* It encourages the old two-browser thinking: ok, so you can do your IE interface extensions using ActiveX or whatever... second, you can do your Gecko interface extensions using XUL... third, you can do your standards-compliant version... but oh wait, there's only the budget for maintaining and testing two versions, so let's ditch that.
* It complicates Web page interfaces. Web pages work in a way that's easy to understand because they are so limited. There are a handful of basic form controls; you move between pages by clicking on links and submitting forms. That's it. Once a user has mastered that, they've mastered the Web. Complicating Web applications by the use of XUL can throw away this advantage of Web-based applications, making it into something that should have had a specialised client anyway. (Of course there's nothing to stop you using XUL to implement client applications...) The key reason why Web pages are so flexible - they're easy to search, easy to integrate into other things (for example, I can link directly to a page about a specific book on amazon.com, which I couldn't do if Amazon ran a specific client application), easy to translate, easy to make accessible for those with disabilities, easy to repurpose... - is that the format is, at its heart, a simple document format. With simplicity comes power. When you start making Web pages into 'applications' in their own right (rather than, as at amazon.com, documents that represent a server-side application) you start to lose both simplicity and this flexibility.
Of course putting an XUL dropdown menu into your page is not going to stop it having all those advantages :) It will suck, because dropdown menus on web pages do always suck, but that's the limit of it. However, you could view it as the beginning of a slippery slope... I would hate to see a world in which every Web site (amazon.com, bn.com, mozillazine.org...) became its own little application, all of which we had to learn individually.