Code vs. Markup or Markup + Code
XAML or F#? asks if F# isn’t more concise and functional than Xaml.
Programming languages are very powerful, I’m sure we all have our favorites. In the end though, Programming Languages are difficult for a wide set of tools to deal with and manipulate. Xaml by comparison has fewer ways to represent an object tree than code – so it should be easier to build systems to manipulate that representation.
One of the advantages of having a canonical representation of an object tree, is that it serves as a great interchange enabler. That canonical representation doesn’t need to be Xml, but it seems like a good choice.
Since Xaml Vocabularies need to buy into Xaml’s "Markup==Object Model" philosophy, anything you can do from markup, can be done in code. In the end, declarative systems that can be used via markup and via code are what will likely succeed. Designing your system to work well in both worlds is key. Developers who want to only use Code can. Scenarios that require Markup and Code can easily be satisfied.
Useful background: Our 7 Goals For Xaml
Update 2007/05/22: Barry Kelly posts a response: "XML, the right format for object graph serialization".
BK: Sigh. The assumption of an "object tree" – object graphs usually aren’t trees, they typically have lots of cross-references.
RR: Yes…my team usually corrects me from tree to graph…my mistake.
BK: Converting objects to XML requires some naming scheme for those objects which have relationships more complex than parent-child.
RR: Today in WPF we have resource references and bindings to properties, but no generic Xaml Language (x:) way to do the object graph…but we’d like to get there.