Disclaimer: My name is Don Demsak, and I’m not a Microsoft employee. I am an independent consultant and a Microsoft MVP in the area of XML. Any information on a Microsoft technology contained in this post is publicly available and not covered under a NDA or obtained via internal Microsoft sources. I do not speak for Microsoft and all opinions are my own.
Adam Kinney had a post on “What Is XAML” which started a new thread on the xml-dev discussion which started to disseminate some false information, so I decided to try to clarify things a bit.
Let’s start with definitions from people that actually work for Microsoft and know a little something about XAML:
- Don Box has a great description of what XAML is “A way to wire up CLR objects, no more, no less”.
- Chris Anderson’s definition of XAML – “XAML is a declarative markup language that defines an object model”
These definitions are very good, but for some, they are too abstract and cause confusion (well XAML is very abstract to begin with), so I’m going to try to explain it a different way.
There are folks who claim that XAML is Microsoft replacements to SVG, (X)HTML, CSS, and other W3C recommendations (plus some non-W3C recommendations). The problem with this view is that when they are talking about something like SVG or XHTML, they are really talking about 3 different things.
1. The syntax of the serialization format-- i.e < path />
2. The Object Model-- i.e. the path class
3. The serialization to Object Model translation engine.-- Instantiates an instance of a path class with the information from the element.
Most developers subconsciously understand that when someone mentions an XML based language (like SVG or XHTML), they are really talking about the syntax and the object model (items 1 and 2), but most forget about item 3, which glues item 1 to item 2 (unless the developer has written things like item 3).
XAML does not define an object model (item 2) (it is up to the developer to create it in .Net), but by using XAML technology it does help determine the serialization format (item 1), which is used in XAML core competency, the serialization to Object Model translations (item 3). But, it would also be incorrect to say that XAML is just an XML binding framework (like OMG’s XMI, or Sun’s XmlBeanEncoder), because it adds the ability to expand upon the simple language binding and create a more natural (less structured) syntax.