XAML: An insider’s look out

Posted by Steve over lunch on Thursday the 24th of November, 2005

Zach recently posted his thoughts on Microsoft’s XAML. As my main development environment is Microsoft’s .Net Framework, I’ve had a chance to have a more in-depth look at what XAML is and does, and feel that I should clear some points up.

Disclaimer: I have no knowledge of Microsoft’s true plans for XAML. These are simply my observations based on what I’ve read and seen on the Internet, and cursory fiddlings with XAML as part of the WinFX pre-release SDK

What is this XAML you speak of?

XAML is Microsoft’s new application markup language (as noted in the name ‘eXtensible Application Markup Language’).

This, then, automatically implies that its primary focus is applications or, more specifically, client-side applications. These could be the likes of Microsoft Word, or they could be something that runs on the client, but is hosted in a browser environment (read: Flash applications).

The raison d’être of XAML, rather than being to replace HTML, is (or rather, would appear to be) to allow client-side application developers to seperate their user interface ‘code’ from their functional code.

Why all the hubbub?

Web developers know that having a hulking great piece of JavaScriptECMAScript to build their entire user interface isn’t good for code maintenance. Why should the same not be true for client-side applications? After all, you don’t hear anyone crying think of the children! when people talk about XUL which is, ultimately, a different implementation of the same concept.

Personally, I think most of the noise is because Microsoft is making (and, in fact, has to make) noise about the benefits of XAML over the old-school way of doing things. Your average in-house developer, closed off from the outside world, that only uses computers for their day job will probably only care about what comes from the hand of God. Add to that the fact that Microsoft has to get the message out to what probably amounts to millions of developers, and they need to make a lot of noise.

Compare this again to XUL: it’s not the default framework for the most used operating system in the world; it has a handful of ‘big’ adopters (who are, in terms of user base, significantly smaller than that of Windows) and a (relatively) small, vocal developer-base.

The point, however, is that XUL and XAML have very similar goals in mind: seperation of interface structure and presentation from ‘logic‘.

Implementation

As a very strong advocate of semantic, accessible web development, the implementation details of XAML grate against my nerves slightly, but not as much as you might think.

Usability

Look at the CD Catalogue, that’s less usable friendly than what Amazon is. That makes me wonder if the web is turning too looks specific. Soon the content will be forgotten and it’ll only be about looks. With that, it looks as though its taking the focus of what the web’s built for (‘To house globally accessible documents’).

I’m not sure Zach’s comparison of the CD Catalogue tech demo with Amazon is a fair one; a better one would be to something like CoverFlow with Amazon integration. It’s also worth bearing in mind that this is a tech demo we’re talking about, not a final product.

Further, I would reiterate the point that XAML is for applications, not documents.

Semantics

Zach also laments the lack of semantics within XAML, referencing setting an attribute value (Value="verticalgradient LimeGreen Green"), rather than some seperate, more semantic notation (he seperates the three values into their own attributes).

This is one point I’d tend to agree with Zach on and, in fact, take one step further: if Microsoft really want to seperate things, allow seperation of structure from presentation, too. As I noted earlier, I’ve a strong feeling that this is already possible, to some degree but, if it is, it’s almost certainly not enforced in any way (like, say, a completely different markup tailored for each, with some form of referencing).

Platform specificity

Every year more people are switching to a Mac for various reasons(I’m not going to get into a debate here), what about them? Will Mac retaliate and do their own version thus leaving Windows users in the dark on some of the web pages. Will their [sic] be a port? Will it get taken back by Microsoft in the hope to fish some Mac users over?

Looking at the direction Microsoft appear to be taking with their Sparkle Interactive Designer (as a tool to create rich applications on Windows and the web), you can almost taste the ‘we want a piece of Flash’ sentiment. Add to that the fact that Microsoft explicitly state that the output from Sparkle will work cross platform and device (in their Expression family tour). I wouldn’t be in the least surprised if we see:

Final thoughts

This is something I’ve actually been mulling over for quite a while and, much as I don’t like the approach Microsoft are taking in terms of the actual markup, I can see XAML making my life (and the lives of those I work with) far, far easier when we have to manage future application interfaces.

It is far from the panacea Microsoft are suggesting that it is, but it is still far superior to the current code-soup approach in most Windows applications.

Filed under

Something to say? Contact Steve (at journal@this domain) or link to this post from your blog.

4 comments

  1. Nice title ;)

    You’ve lifted a lot of the gaps I had actually. Thanks. As my said ‘Its good to be interested now, hopefully we can sway it to be semantic so we don’t have the current problem we’re having’.

    It will be interesting on how this will play out but im still not convinced.

     Zach Inglis
    5 hours, 21 minutes after the fact
  2. One of the things I can see becoming more important in the future is specifically defined XSDs. By this I mean that as XHTML is a subset of XML, so also there should be subtypes of XSD. For example: Shop Schema Definitions.

    <sd:productline name="products">
    <sd:complexType>
    <sd:product name="to" type="sd:string"/>
    </sd:complexType>
    </sd:productline>

    In this way, people (shops) can provide feeds in any proprietary format they like. So long as there’s an XSD associated with the file, an application can receive the information and do something meaningful with it.

    Also, the additional information would make searching much more accurate. Imagine writing a price comparison engine for that! It’d take seconds!

    All your XSDs are belong to us :)

     Nathan Kitchen
    1 day after the fact
  3. [...] XAML: An Insider’s Look Out [...]

  4. Fortunately the company I work for is part of the beta program for MS and we have a copy of sparkle. Playing with it a little I can definately see the advantages that a .Net developer would have in using the XAML part of sparkle to develope desktop or webbased apps. I do think in a few years it there will be the case where using sparkle for a certain project will be much more effective than flash. Due to advantages in work flow because of XAML or data exchange. With that being said any progress or progressive ideas MS has created could be swallowed up by Adobe. Also please remember that Adobe is already using a XML markup for application building with Flex but I doubt they would ever move to creating desktop apps in addition to web apps.

     Pete
    2 months, 1 week after the fact