Although XAML seems to have resonated very much with the development community and there has been a lot of discussion about its relation to HTML and XUL, its ability to wire up .NET object graphs, the impact it will have on the development process by involving graphical designers in the development areas, and so on...
...there's another implication of XAML that I think that people have missed, and I would like to see more discussion of. XAML is actually another serialization format. Avalon provides the ability to serialize any element tree, actually any .NET object graph, into XAML, not just read from it.
If application developers start writing document-based applications that follow the Avalon model of deriving new classes from existing elements, or even simply reusing existing elements, and turning on some of Avalon's designer services, XAML could quickly become one of the most common file formats. Developers could simply reuse Avalon's serialization services rather than write their own. Thus, XAML files would not only describe user interfaces, but they can also describe full documents.
XAML could become a universal document format. Of course, any custom element would not be usable by an arbitrary application that doesn't have explicit support for that element.
What exactly does "document" mean, in this context?
Wesner writes:
"Avalon provides the ability to serialize any element tree, actually any .NET object graph, into XAML, not just read from it."
I don't think is correct. I can't find the quote from, I think Chris Sells (or was is Chris Anderson) right now, but XAML is a specific format for specific classes. He says that .NET's general serialization should be used for serializing .NET objects, etc. This is different than XAML.
"If application developers start writing document-based applications that follow the Avalon model of deriving new classes from existing elements,"
Umm, what exactly makes deriving new classes from existing elements "Avalon"? This sounds like inheritence. What am missing?
"XAML could quickly become one of the most common file formats."
Why? What's the advantage? xml is verbose. Why would I want to make my documents bigger by using xml?
I guess I don't get it. We have XML, and XAML is XML with classes representing the tags, properties representing the attributes. How does this help to describe a document? I think "document" really needs to be defined here.
Marc
Posted by: Marc Clifton | May 29, 2004 at 04:32 AM
XAML is suppose to be an easy to use XML serialization format, that works on .NET trees rather arbitrary .NET graphs.
The point I was trying to make is that Avalon elements would form the foundation of future documents, and the XAML is the document format for these elements. XAML is not necessarily specific to the Avalon UI. Custom elements are possible through the combination of derived (inherited) elements and composition; XAML does provide a way to refer to other assemblies for custom elements.
Thus, creating documents based on Avalon element trees will be fairly common, because of the ease of use of element composition and inheritance, and the richness of the Avalon infrastructure.
XAML is verbose but that won't stop people from using it all together for their document formats, especimally since BAML is also available in binary format.
When I say document, I refer to webpages, spreadsheets, wordprocessor, graphics documents--typical of desktop applications-- which can be edited and printed.
Posted by: Wesner Moise | May 29, 2004 at 05:15 AM