[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Microsoft Hypes Up XUL As The Greatest ExpirimentSince Ada


xul design
At 7:49 PM -0500 10/27/03, Gerald Bauer wrote:

>    Now let's look what a button looks like in the
>"revolutionary" Microsoft XAML thingy:
>
>    <Button Background="LightSeaGreen" FontSize="24pt">
>      Calculate
>    </Button>
>
>    Whow. Compared to the XUL version:
>
>    <button label="Calculate" style="background:
>lightSeaGreen; font-size: 24pt" />

Hmm. To me it looks like XAML is considerably better designed than 
XUL. This is very much like the difference between SVG and XSL-FO 
that I wrote about in Item 11 of Effective XML, Make structure 
explicit through markup. XUL is using a double syntax with embedded 
CSS. The syntax should be XML, even if the semantics come from CSS. 
XAML and XSL-FO get this right. XUL and SVG get this wrong. I've now 
put that chapter online: 
http://www.cafeconleche.org/books/effectivexml/chapters/11.html

I think someone asked if it would be possible to write an XSLT 
stylesheet to convert from XAML to XUL. One consequence of XUL's 
design is that it is much easier to write a stylesheet to go from 
XAML to XUL than from XUL to XAML. XAML-->XUL is straightforward 
because all the important XAML structures are marked up in XML. 
XUL-->XAML requires writing a CSS parser in XSLT, doable but ugly and 
hard.

The use of a potentially structured label is also a decided 
improvement in XAML, as I wrote about in Item 12 of Effective XML, 
Store metadata in attributes. XUL's approach is decidedly limited. It 
can't easily be extended to make a label anything other than plain 
text. I've put that chapter online too: 
http://www.cafeconleche.org/books/effectivexml/chapters/12.html

Of course, I'm basing all of this on just one example, so it's 
possible there are other issues here. And XAML may be making mistakes 
too. Petzold's article suggests that it's misusing CDATA sections in 
violation of Item 15, Build on top of structures, not syntax. "Any 
programming code in an XAML file must be enclosed in a CDATA section. 
" However, there I strongly suspect it's just Petzold's  inexperience 
with markup causing him to make false statements rather than an 
underlying problem with XAML.

Either way, this is an instructive example of the right and wrong way 
to use markup. For a change, it looks like Microsoft is the one doing 
it right.

-- 

   Elliotte Rusty Harold
   elharo@m...
   Processing XML with Java (Addison-Wesley, 2002)
   http://www.cafeconleche.org/books/xmljava
   http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.