After fiddling around with XAML a little bit yesterday, an embryonic idea was
floating around in my head about why this was tied directly to Avalon. In other
words, if XAML is an XML syntax for constructing Avalon objects and properties
and wiring them up with the appropriate event handlers, what prevents XAML being
abstracted to work with non-Avalon objects?
Greater minds than mine have also noticed this same opportunity for
abstraction, it seems, and Don Box has
written a short sample that uses XAML to produce a console application. This
is a really clever example of utilising XML to build a simple object.
Once coupled with some designer tools and a decent IDE, you can start to
imagine XAML as a 4GL of sorts, due to its ability to compile into different
languages. For some applications, you could imagine using XAML as an
extensibility point. If you’re an ISV, you could use the partial class
capability of XAML to allow customisation of existing classes, rather than
requiring users to use VBA or the like to build add-on solutions. For
applications with more complex business objects, Don’s sample raises the
intriguing possibility of using XAML on the middle-tier.
For now, of course, most of us would be satisfied with a decent Avalon XAML
designer rather than having to hand-code everything, but it’s interesting to see
how one idea sparks off others…