Scaring the Natives with XML

Don Box's Spoutlet

Syndication

I've gotten a lot of feedback on the talk that Dharma and I gave at the recent MVP summit.
 
One thing that he and I obviously didn't make clear is how XAML fits into the WinFX picture.
 
XAML allows you to specify various aspects of a WinFX application in an XML-based format.
 
Even though anything you can do in XAML, you can also do in code, the fact that you can elect to express parts of the app outside of code is (in my mind, at least) a pretty useful thing. Specifically, the use of a separate declaration "language" allows domain-specific designers to be created that don't need to spelunk VB/C#/C++/Delphi/etc code. 
 
In our talk, we used one such designer to create and edit the XAML for our initial workflow definition. Nice boxes and arrows - no angle brackets to be found.  WWF's designer ships as a hostable control and is embeddable in any application. We wire it up into VS for you, since a lot of developer-types will want to design their processes in the same environment they write their code in.
 
Apparently, when I showed the underlying (gasp) textual XML, the presence of angle brackets somehow confused people. Hence this post.
 
Here's the deal.
 
The percentage of people who will create and edit XAML using a domain-specific visual editor (e.g., the workflow designer, expression, VS v.next, etc.) is statistically 100%.
 
The percentage of people who will create and edit XAML using a text editor is statistically zero (in fact, most of them maintain blogs on this  very  site).
 
The fact that a developer can write tools that create and manipulate that XAML using common everyday household objects is hugely enabling, even if again, statistically very few developers write those tools. 
 
Don't underestimate the leverage we get out of a few   programmers  writing a tool for mass numbers of domain experts.

Posted Sep 30 2005, 07:57 PM by don-box

Comments

GeorgeN wrote re: Scaring the Natives with XML
on 09-30-2005 3:58 PM
What a big difference Don

The percentage of people who actually creates and edit XUL using a domain-specific visual editor is statistically 0%.

OTOH, the percentage of people who creates and edit XUL using a text editor is statistically 100%

Can you comment on why such a difference between similar technologies?
Dan J wrote re: Scaring the Natives with XML
on 09-30-2005 5:17 PM
What's the benefit of having both WWF and WPF use the same XAML file format? What happened to XOML?
Don Box wrote re: Scaring the Natives with XML
on 10-01-2005 9:09 AM
George,

I'm the wrong guy to ask about the XUL user base.

On the XAML side, my prediction is that most people will just design workflows and visuals using the visual designer tools and be blissfully ignorant of the underlying transfer syntax.

The Sparkle and Acrylic folks are certainly counting on this, as are the folks who work on Cider (VS's forthcoming WPF designer) and WWF (which ships with its own designer already).

The fact that we have a documented and easily manipulated format that enables this domain-specific designer ecosystem.

DB
Don Box wrote re: Scaring the Natives with XML
on 10-01-2005 9:24 AM
Dan,

XAML is (and always has been) just an idiomatic use of XML that could be used in any domain.

ChrisAn and I started making this point back in 2003 (see http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20031218xamldb/manifest.xml).

WWF snapped to an early draft of XAML and coined the term XOML for that version of XAML.

By WWF beta 2, we plan to snap to the "final" version of XAML that will be used by both WPF and WWF (and anyone else who jumps on the XAML bandwagon).

The upside of using XAML's idioms are simple.

There's power in sameness.

Having a single set of idioms allows us to build less parser/deserializer machinery, which improves the quality of the platform not to mention reduces the surface area of the programming surface.

Having a single set of idioms allows our users to learn one set of "meta-constructs" that apply in a variety of domains that they may encounter as a modern Windows programmer.

If you're a text editor kind of guy, this means that if you know how to author XAML for WPF, you're most of the way there to knowing how to author XAML for WWF (or whatever W*F comes next).

More importantly, if you're designing an new framework for use by your team or your customers, you can leverage the same infrastructure that WPF and WWF use.

DB
Don Box wrote re: Scaring the Natives with XML
on 10-01-2005 9:28 AM
Don (now I'm answering my own comments in comments),

You mentioned that "if you know how to author XAML for WPF, you're most of the way there to knowing how to author XAML for WWF (or whatever W*F comes next). "

I believe what you meant to say was this:

"once you know how to read/write XAML for WPF, if/when you decide to start read/write XAML for WWF (or whatever W*F comes next), you don't have to reinvent the XML-specific machinery but rather can focus on the new concepts of that domain."

Did I get it right?

DB

Don Box wrote re: Scaring the Natives with XML
on 10-01-2005 9:29 AM
Don,

Except for omitting the grammar mistakes, I couldn't have said it better.

Thanks for cleaning up my mess.

Cheers,
DB
Nick Parker wrote re: Scaring the Natives with XML
on 10-01-2005 9:28 PM
So am I the only one awaiting Rocky's response to this post? :-)
Alistair Laing wrote Scaring the natives with angle brackets
on 10-02-2005 4:59 PM
Christopher Steen wrote Link Listing - October 2, 2005
on 10-02-2005 10:42 PM
[Solid Quality ASP.NET] Bits and pieces of your
viewstate [Via: DinoE ]
ASP.NET 2.0, SQL Server 2005,...
John Conwell wrote re: Scaring the Natives with XML
on 10-03-2005 6:49 AM
Why is Microsoft trying to encode the entire world into XML? I dont get this. It like there is a team of people in redmond just sitting around going "hmmm, what else can we turn into an XML structure? Wait, I know...the color palate, or the unicode table...or bitmaps, YES BITMAPS. That'll be slow, huge, and anaying...YES!". Another example of microsoft trying to find and force upon the entire world the next "Silver Bullet".
sdk wrote re: Scaring the Natives with XML
on 10-03-2005 10:51 AM
John - did you read Don's post? That's kind of what he was trying to explain.

It's worth noting that even though XAML is an XML based language, this doesn't mean it can't be compiled away to something lean and fast. XML happens to be a great base for declarative languages like XAML, but it's still just a language all the same.
@ Head wrote Never code in XSLT again !!
on 10-06-2005 12:02 AM
Scott Rudy wrote re: Scaring the Natives with XML
on 10-06-2005 2:14 PM
It seems to me that XAML is just another language that can be understood by the CLR. What makes it nice is that now any DSL (or model) can be excesselteed into XAML and be run by the CLR to give a user an application built on W*F. Since there really is only one application anyway this takes configuration to a whole new level.
hacked.brain wrote The XAML Experience
on 10-06-2005 10:10 PM
Harry Pierson's DevHawk Weblog wrote The Irrelevant Semantics of Compiled XAML
on 10-07-2005 2:13 AM
From newly converted ARC MVP Sam Gentile, I found this interesting post from Drew Marsh about how XAML...
@ Head wrote Never code in XSLT again !!
on 04-06-2006 11:06 PM
A really cool side effect of what is planned for VB9, is you will never have to code in XSLT ever again...
OS wrote But How?
on 11-22-2006 11:23 AM
..."More importantly, if you're designing an new framework for use by your team or your customers, you can leverage the same infrastructure that WPF and WWF use."

It been difficult to determine exactly how the WPF and WF teams leveraged this infrastructure since it appears to be implemented very differently for each technology. The XAML/XOML syntax may be the same but the designer support and code generation appears to be very different. The design time support in the RTM Workflow designer appears to be implemented in a fairly standard way while WPF is completely different (no Designer Attributes, etc). Also classes such as MarkupExtension in the System.Windows.Markup namespace also show up in System.Workflow.ComponentModel and these classes share no common heritage.

Guidance is needed on how to leverage xaml/xoml for custom frameworks. Does anyone have any?

Add a Comment

(required)  
(optional)
(required)  
Remember Me?