Longhorn Markup Language (code-named "XAML") Overview
started 10/28/2003; 5:48:42 AM - last post 11/1/2003; 11:56:07 AM
|
|
Ehud Lamm - Longhorn Markup Language (code-named "XAML") Overview
10/28/2003; 5:48:42 AM (reads: 12536, responses: 8)
|
|
|
Tim Sweeney - Re: Longhorn Markup Language (code-named
10/28/2003; 2:13:54 PM (reads: 645, responses: 1)
|
|
C# is a wonderful programming language with support for meta-data attributes and reflection, great features for associating properties with UI controls. Yet instead of exploiting this, they define a new dialect of XML, a very programmer-unfriendly language that maps poorly onto the C#/.NET type system.
Worse, to do any actual event handling, they actually embed C# into XML, resulting in code like their example:
<Canvas ID="root"
xmlns="http://schemas.microsoft.com/2003/xaml"
xmlns:def="Definition">
<Button ID="button1" Click="Clicked">Click Me!</Button>
<def:Code>
<![CDATA void Clicked(object sender, ClickEventArgs args)
{
button1.Content = "Hello World";
}
]]>
</def:Code>
</Canvas>
How horrid.
|
|
Sjoerd Visscher - Re: Longhorn Markup Language (code-named
10/28/2003; 3:08:28 PM (reads: 629, responses: 0)
|
|
|
Ehud Lamm - Re: Longhorn Markup Language (code-named
10/28/2003; 3:51:13 PM (reads: 630, responses: 0)
|
|
C# is a general purpose programming language. XAML is a DSL for describing GUI elements. I don't see why they should be combined.
You may want to use XAML without having to learn C#.
The approach seems reasonable. But the resulting language, XMAL, may be horrid. I didn't study it enough to be able to tell at this point if that's the case.
I am certain the integration with C# and assorted tools will be announced RSN...
|
|
Ehud Lamm - Re: Longhorn Markup Language (code-named "XAML") Overview
10/28/2003; 4:05:40 PM (reads: 614, responses: 0)
|
|
|
Patrick Logan - Re: Longhorn Markup Language (code-named
10/28/2003; 10:43:29 PM (reads: 594, responses: 0)
|
|
|
bryan rasmussen - Re: Longhorn Markup Language (code-named
10/29/2003; 4:25:20 AM (reads: 540, responses: 0)
|
|
There's a big xml-dev thread on this, started with someone complaining that this was a rip-off of xul, but got interesting after that: http://lists.xml.org/archives/xml-dev/200310/msg00793.html
most common complaint seen there, is the need for css styling for these elements.
This also seems related to the complaint, which is mine, that whether or not this has embedded c# it is one ugly markup language, I don't know what it is, microsoft has some really good xml people working for them, but they have this in-house style for a lot of markup that comes out of there that just bugs the hell out of me.
One thing I hate in a markup language is variations in capitalization, because of course xml is case-sensitive.
This can make writing xaml difficult unless one has an editor specifically adapted to writing it, it can also make writing scripts etc. for working with one's xaml files more of a chore, consider the following xpath:
//xa:Canvas[@ID="root"]/xa:Button[following-sibling::def:Code]
now extrapolate to when you want to work with camel-cased objects from an xslt, sax parser, some script using the dom. just a lot of chances for misspellings it seems to me.
|
|
Ehud Lamm - Re: Longhorn Markup Language (code-named
10/29/2003; 1:06:25 PM (reads: 479, responses: 0)
|
|
|
Ehud Lamm - Re: Longhorn Markup Language (code-named
11/1/2003; 11:56:07 AM (reads: 307, responses: 0)
|
|
At least now we know what partial classes are for.
|
|
|
|