On Sun, 1 Jan 2006 09:07:33 -0800, "Jeff" <A@B.COM> wrote:
Thanks Scott... could you elaborate a bit?... perhaps point me/us to
additional reading?
Well, let's say I write this hunk of XAML:
<Page x:Class="Defaul t_page" Title="Home">
<TextBlock FontSize ="18" TextWrapping="W rap">
CheckOut
<Hyperlink NavigateUri="pa ge2.xaml">Page 2!</Hyperlink>,
</TextBlock>
</Page>
The first question is - am I describing the UI for a web form, or a UI
for Windows Presentation Framework (WPF)? I don't know just by looking
- it could be either! If I add an XML namespace specific to WPF
(xmlns="http://schemas.microso ft.com/winfx/avalon/2005"), then I'd
know.
Everyone associates XAML with WPF at first, but XAML doesn't
necessarily have to be tied to WPF. Let's take a step back even
further.
What am I doing with XAML? I am giving declarative instructions to:
Create a Page object and set the Title property.
Create a TextBlock object with FontSize and TextWrapping properties
set, then add the TextBlock to the Page's content.
Create some literal text, and a Hyperlink object to add the to
TextBlock content.
And so on...
What I'm really doing is providing instructions to build a tree of
managed objects. The tree of objects could represent a window, a
webform, even ...
<SequentialWork flow x:Class="HelloW orld" >
<SequentialWork flow.Parameters >
<wcm:Paramete r Name="FirstName " Type="System.St ring">
<wcm:Paramete r Name="LastName" Type="System.St ring">
</SequentialWorkf low.Parameters>
<Code ExecuteCode="co de1_CodeHandler " ID="code1" />
</SequentialWorkf low>
... a Workflow [1].
Because XAML is general purpose, and because it's toolable (meaning it
will work with designers, compilers, and the tools we write
ourselves), XAML and XAML-like technologies are bound to become more
prevalent in the next 5 years in a number of areas (not just UI), as a
way to manage complexity (because the above XAML snippets cut down on
the amount of code we'd have to write to do the same thing, and
because it is toolable we might not have to make a lot of effort
maintaining the XAML, either).
Of course, because XAML is so toolable, I'm not sure how *visible*
XAML will actually be. It will certainly be behind the scenes of many
tools [2], but not something we work with by hand very much.
[1]
http://msdn.microsoft.com/windowsvis...ding/workflow/
[2]
http://www.microsoft.com/products/ex...r/default.aspx
I hope this afternoon ramble makes some sense...
--
Scott
http://www.OdeToCode.com/blogs/scott/