I just attended sequential talks on XAML (from Rob Relyea of Microsoft) and XUL (from Ben Goodger, Firefox Lead Developer) at the XTech conference. One could argue about whether and how these technologies are in competition, but what struck me most were the differences in focus, approach and design philosophy, which I would summarise as exclusivity vs. inclusivity.

  • Portability. The motivation behind XAML seems to be to make it easy to write Windows applications, or web applications in IE. The motivation behind XUL was to provide a first class UI on every platform without having to do the work multiple times – i.e. “we want to be inclusive; let’s work out how we can do that”.
  • Localisation. The XUL system is designed to be very easy to localise, and Ben made a point of mentioning it. Firefox 1.0 is available in 40 languages, localised entirely by volunteers. No mention was made of localisation in the XAML presentation.
  • Licensing. The XAML presenter dodged the question of whether Free software implementations of XAML are possible. The reference XUL implementation is available to all under a Free licence, the standard (as far as it’s documented) is open, and the authors neither hold nor would enforce patents on it.

Of course, having only heard 45 minutes on XAML, I could be mistaken in some of my understanding. Alternative views or corrections welcome.

28 thoughts on “XAML and XUL

  1. Having seen the XAML demonstration at WinHEC, it appears that Microsoft’s plans are to release a technology that is so far ahead in wow-factor that businesses will be pushing to get XAML web sites, viewable only in IE rather than work to web-standards as has been the case.

    You can’t dismiss somebody who wants to cull the competition by blowing everything out of the water quality wise, *shrug*

    This looks set to be the new wave of MS & Windows lock-in.

  2. Do you know whether the presentations (slides) of Rob Relyea and Ben Goodger are available electronically?

  3. Please don’t do this too the web again. Remember <font>,<frame>,<object>, and all tourchered tags that still haunt the web today. Granted this time at least on side is an open platform. But I would really like it if we could go a little more along with the Standards and not some Gecko or MSHTML nonsense. Why aren’t XForms good enough?

  4. What’s the difference between XAML and XUL

    Gervase Markham has a nice blog post where he describes the difference between two XML user interface languages. XAML from Microsoft and XUL from Mozilla. The three big differences are: Portability, Localization, Licensing. Read the blog posting…

  5. @Alan Trick: because XForms are targetted at … guess what: forms. XUL and XAML are also good for applications beyond forms. I agree that XAML isn’t that well designed, but — unfortunately — XUL has also some problems. Nevertheless, XUL, as well as XBL are good technologies … we just need to sort out some of their problems.

  6. If we put the “proprietary and windows only” argument aside for a while – what’s left? Localisation will definitly be adressed, windows is available in several languages and Microsoft usually does a good job in localisation.

    What XUL lacks from my point of view is:

    1. Documentation / SDK
    xulplanet is a good starting point, but by far not enough. It’s an API documentation with a few tutorials. Nothing you could consider an SDK. And (to come back to one of your arguments) afaik there is virtually no localized documentation for XUL/XPCOM (please correct my if i am wrong). Microsoft usually offers huge and localized SDKs and (paid) support.

    2. 3D support
    What makes XAML so fancy (and mighty) is the support for calling 3D functions. Go through the currently available beta stuff or watch some videos on channel9.msdn.com about XAML. One of the typical examples for XUL is this amazon client application (forgot the link). Watch the channel9 movie about putting dvd covers as textures on a rotating 3d box in a XAML “online store”. That is mindblowing.

    3. An editor
    Beside pure text editors or general XML editors afaik there is no real (non beta) XUL application editor available (again, correct me if i am wrong). With Visual Studio you will get a mighty editor to produce XAML and to connect XAML applications to existing apps in any other language (especially .NET stuff for sure).

    I am currently undecided of what to expect from XAML or XUL. From my point of view both things will be “proprietary” in the future. Sure, XUL is open – but since Microsoft probably won’t adopt it the number of people capable of running XUL apps is and will be too low (at least for the next few years). This will keep XUL being “defacto proprietary”. (Probably not a good wording – but i think you get the point).

    XAML will definitly stay proprietary and even if other products adopt and create a parser it will probably always stay a “second best” with limitations since other constructs like ActiveX, DirectX or Windows Media are just not available on all platforms.

    The question to me is: If you are going to create a “web application” (like Google Maps – not a desktop app like Firefox), is it ever worth creating it in XAML or XUL? Or is it better to stick with the limitations of HTML, CSS and JavaScript and create a product that works for everybody?

    I assume XAML/XUL will go the way of Java (applets) and ActiveX (controls) – getting used on the desktop/servers quite often, but getting used a “nice to have” thing on websites. Just for “fancy features” not for real purposes (just like Flash or VRML).

  7. @mikx
    “Just for “fancy features” not for real purposes (just like Flash or VRML).”

    The reason for this is that Flash is basically useless at functioning as an integral part of the HTML/CSS page it sits on – ever seen a phpbb esque forum written entirely in flash?

    This is why I see SVG replacing flash in many areas, being able to create SVG interlaced with the page’s HTML and CSS – and which can be spat out dynamically by a server script – that’s plain awesome.

  8. Both XAML and XUL will stay proprietary. So better keep them away from the web.

    @Alan Trick: is defined in W3C spec. It is just that IE doesn’t implement it correctly.

  9. Both XAML and XUL will stay proprietary. So better keep them away from the web.

    @Alan Trick: is defined in W3C spec. It is just that IE doesn’t implement it correctly.

  10. I’m sorry minghong, I’m not quite sure what you were getting at. Are you refering to the tags I mentioned? If so I know there in the HTML spec but that was after they had been introduced as proprietary tags by one side or the other. The W3C was just doing damage control. The only one that’s survied XHTML is <object> but that is because it is nothing like when Microsoft first introduced it.

    I have a felling (hope) that this will be kind of like ActiveX. A proprietary ‘feature’ that most people recognize as such and stay clear of. For one thing Microsoft’s support of XHTML is non-existant so I doubt they have planes for being able to mix the two. It will probably be full of CSS mishief, and of course is only available on your microsoft platform.

    I’m not quite sure why Microsoft doesn’t understand the web yet, mabye it’s because it contradics so much with it’s bussiness, but HTML and the other successful languages have always been open. Without open you are limiting yourself to a platform and at that rate, why are you developing on the web at all? Make a desktop app for goodness sake.

    Remember .NET? One platform to rule them all? No all I think of when I hear of .NET are those poor asp.net ‘dev’ blogs. IMO there a great testement to why we shouldn’t get swayed with the latest ideas and ‘bringing the desktop to the internet’.

  11. I talked a little with the XAML guy, get ready for this: XAML is XML, but doesn�t expose the DOM interface. In fact, it doesn�t use the DOM to parse the document (it uses the .NET equivalent of SAX). Instead, you just get objects with .children, .items, etc methods, returning arrays or something like that.

    Doesn�t that beat about, well, half of the usefulness of XML? If you have a library of functions operating on the .NET implementation of the DOM, you won�t be able to use them.

    This also means: no XPath. Unless they code it from scratch, and in a pretty messy way. I wonder what they would use instead. IDs? Sounds bothersome to me. Or maybe some proprietary path thing. Knowing Microsoft, that might be likely.

    Additionally, in the browser, the only way to embed it into a document is through an iframe. No XHTML and no namespacing stuff. Not that I�m surprised by that. Guess I�m spoiled by Mozilla :).


  12. Avalon: More Power, Less Pain

    Gervase Markham is attending XTech, an XML focused conference in Amsterdam.  He attended my…

  13. Gervase-
    Yes, I didn’t get everything across in my talk that I would like.

    Your first issue is always an interesting one…I replied via a post: http://longhornblogs.com/rrelyea/archive/2005/05/26/14122.aspx

    Globalization/Localization is something that we have focused on quite a bit.
    The WinFX SDK has this overview: http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/wcp_conceptual/winfx/port_tech_locglob.asp
    That documentation doesn’t yet go into many details how we localize strings in xaml files. I’m working with the avalon globalization team (all sleeping in Redmond now) to get a writeup.

    Licensing: We currently have no plans to license Avalon technology widely.

  14. “The XAML presenter dodged the question of whether Free software implementations of XAML are possible.”

    “Licensing: We currently have no plans to license Avalon technology widely.”

    Rob, you just dodged it again.


  15. From a comment on Rob�s weblog:

    “XAML is being targetted as source code for Windows applications or as data for applications which choose to use it, not for generally browsing. We used to support navigation directly to a xaml file in IE, but have removed that support.”

    Interesting. And a wise choice, I think. XAML makes *a lot* of sense as an application platform for Windows, XML user interface languages are very comfortable to work with when creating a GUI. But on the internet… Internet is all about platform-independence, I think, and XAML doesn�t meet that requirement.


  16. p.s. Rob made an interesting case today that for user interfaces, XPath support isn�t as useful as it is for web applications (like Backbase or XForms) – I have to think about that a little :). Still, I think it would of course be nice to have, and it would have been more logical to base everything on the DOM and implement and extend the DOMElement interfaces.

  17. Re: Rob Relyea’s blog post

    To be sure we understand the dialog that has been going back and forth, Gervase nailed down three points on which XUL is seemingly better than XAML either through interpretation from Rob Relyea’s XTech presentation or lack of explanation from Relyea and Microsoft.

    Rob Relyea said he “replied” with his blog post, but if you read his post and the comments, it’s plain to see that he simply confirmed two of Gervase’s points (portability, licensing) and provided absolutely no further illumination about the remaining point (localization).

    In my humble opinion, this kind of dodging stinks of dubious salesmanship and should be left to Microsoft’s PR department; not to its developers when speaking with the world developer community. Instead of addressing or refuting any of Gervase’s points, Rob simply said “Hey, Avalon will be awesome for Windows!”, something that can be expected from a shady vacuum cleaner salesman.

    In general, if you don’t have a rebuttal to an argument against your product, keep quiet. No developer wants to hear more of Microsoft’s sensational marketing blabber.

  18. While XUL apps may be localisable, there is certainly more that they could do in this respect. If you wish to localise a Linux distro, pretty much everything except XUL apps and OpenOffice can be localised by translating PO files.

    So while you the many tools that have been built to work with PO files can be used to translate the majority of strings in the operating system, Firefox needs to be treated specially. Getting rid of this barrier could make translating XUL apps a lot easier.

  19. Brad-
    Marketing, smarketing.

    Since when is confirming, but clarifying marketing?

    I’m working on more clarification on licensing with the appropriate people.

    Localization – I have a step by step guide promised to me…unfortunately it is in our intranet now (and i’m lazy and don’t like using vpn)…i will work to get that published a few months earlier than it would have been…hopefully soon.

    Anyway, I think you’ll find I’m a very technical program manager. I tell you when I don’t know. I’ll follow up with answers.

    Since you think I dodged it again…I’m working to get a more formal answer…hopefully it is closer to “yes” or “no”.

    Fun chatting with you all.


  20. The only thing which seems good to me with XAML is that you get .NET.
    .NET is just simply bigger and more active than XPCOM.
    Plus, I suppose you can use any .NET programming language, and you can only use Javascript with XUL.

    About the support of 3D, I think it will come later in Mozilla, the graphics engine is currently being redone.

  21. Brad: whoa, there. I gave three points where the non-technical approaches were different. Obviously, I think our approach is better, but I’m not accusing Rob of dubious salesmanship or anything like that. Ease off on the Slashdot-juice – this is not some sort of fight. :-)

  22. “Daniel-
    Since you think I dodged it again…I’m working to get a more formal answer…hopefully it is closer to “yes” or “no”.”

    Yes, I think you did. But I’m aware that this is the territory of law and corporate strategy, dangerous for software engineers. I very much appreciate that you are working to get an answer.

    “Fun chatting with you all.


    Dear Rob, what did you expect? We are the slashdot crowd. :)

  23. Slide update: Rob’s are partly in XAML; he’s hacking on the viewer before he releases it. I don’t know where Ben’s are, but apparently they will eventually appear on DevMo in a “slides” section.

  24. Rob: Confirmation to a technical audience warrants no further marketing. Forthcoming technical details are great; we’ll all await them.

    Gerv: The points that I gathered from your post were high-level comparisons of XAML and XUL and an evaluation that firmly stated XUL as the better tool for its purpose. I didn’t mean to put any words into your mouth at all.

    What I said about dubious salesmanship was based purely on my own reading of Rob’s reply and the utter lack of response and/or clarification that I feel comes from that reply. Rob replied again here and assured us all that he will focus on technical details, so I’m happy.

  25. What then do you guys make of this article?

    I know this is an old one, but it does shed a different light on the subject.

    It seems to me at least that at that point, these guys did not think you could compare the 2 technologies and that XAML, or something like it, was the way to go. “Clone XAMl…”

    But if you look at the advantages of the web and the advantages of desktop apps, XAML is a nice fit in between, isn’t it?

    The fact that there is vendor lock-in is pretty obvious; Microsoft will always create apps specific to their own platform and you can’t blame them for doing it.

    If MS chose to go multi-platform they’d be shooting themselves in the foot as it will take quite a bit of resources to port over to a platform like Linux that makes up roughly 5% of the market pending on whose story you believe.

    Sure, there might be more, but the question is this: What percentage of businesses are NOT running Windows as the platform for their business applications.

    And I reckon this is the market MS is after: buss apps that can run over the LAN, a WAN adn over the internet.