XAML vs XUL
posted 2003-10-28
"What's the difference between XAML and XUL?"
Comparisons to XUL have been frequent lately, so I'll address the issue from my (layout-centric) point of view.
As Roger points out: XAML's (and Avalon's) scope is significantly larger than XUL's; XUL was created for constructing Mozilla's GUI, as well as the GUI for applications / services which leverage the Mozilla platform. Avalon is much larger than this. The amount of services and functionality we're providing in Avalon is quite large, and will take a while to digest; but once people start to get it, it'll be clear why XAML is much larger than XUL.
Note: It is difficult to separate XAML and Avalon. XAML is a way to use the Avalon APIs through markup, XAML is translated directly into managed code, calling the same APIs used when constructing an application through code.
- XAML is far more extensible, you can use custom widgets and layouts from markup in XAML; doing so in XUL would require hacking into Mozilla's source.
- Avalon plugs into the .NET framework's numerous libraries; XUL provides JavaScript hooks into the DOM and Mozilla's libraries, which although useful, aren't as complete (or extensible) as .NET's.
- Avalon provides a far richer model for documents than XUL. I will cover more of this in detail in future entries.
- Avalon provides a wide-variety of Application and Document services, including deployment, rich databinding, accessibility and automation, online / offline storage and persisitance, and editing services, to name a few. I'm aware that XUL / Mozilla provide some of these services [deployment (through XPI), some level of databinding, and probably others], but I believe Avalon's services are much richer and more extensible. However, I'm not an expert in Avalon and Mozilla's capabilities in these areas.
- XUL can't be compiled, so you'll always pay the performance cost of parsing.
There are many other differences -- but my bus ride is over now. I'm certain this isn't the last time I'll be addressing these issues.
Disclaimer: I've poked around with XUL before, but not very thoroughly -- I may have some details wrong here. Feel free to correct me. I've used Dave Hyatt's XUL summary as a refresher.