Lambda the Ultimate

inactiveTopic XAML the future of UI programming?
started 10/27/2003; 6:00:51 PM - last post 10/29/2003; 8:23:58 AM
Isaac Gouy - XAML the future of UI programming?  blueArrow
10/27/2003; 6:00:51 PM (reads: 1150, responses: 8)
While we're doing things XML...

"Longhorn" Markup Language (code-named "XAML") Overview
'This topic summarizes the new "Longhorn" markup language (code-named "XAML"), describes what advantages it provides over other programming languages, and demonstrates how to write applications with it.'

Hmmmm is this like XUL or not? Markup-based UI

VW Smalltalker's may recognise some similarities between an XAML file and a windowSpec.

Patrick Logan - Re: XAML the future of UI programming?  blueArrow
10/27/2003; 9:35:26 PM (reads: 1060, responses: 0)
You must write an event handler in a language such as Visual Basic .NET or C#.

I wonder if this is any dotnet language or just a blessed subset.

Patrick Logan - Re: XAML the future of UI programming?  blueArrow
10/27/2003; 10:09:33 PM (reads: 1781, responses: 0)
Hmmmm is this like XUL or not?

Looks kind of like XUL, kind of like SVG.

I've not read enough details to understand such things as, does XAML have a DOM? Is it read-only, or can an event handler modify it?

Is there some remembrance from whence the XAML came? i.e. can an event handler call back to the process that provided it without knowing the "name" of that process?

Or can XAML even originate from a separate process as with XUL or SVG?

In general I like interpreted, dynamic GUIs. So on the surface this seems possibly a step in the right direction.

Sjoerd Visscher - Re: XAML the future of UI programming?  blueArrow
10/28/2003; 1:29:13 AM (reads: 1043, responses: 0)
Yes, XAML has a DOM. I found this:
Public Sub OnClick(sender As object, args As MSAvalon.Windows.Controls.ClickEventArgs)
  Dim b1 As new MSAvalon.Windows.Controls.Button
  b1.Content = "New Button"
  root.Children.Add(b1)
End Sub
If anybody finds the XML schema for XAML, let me know.

Isaac Gouy - Re: XAML the future of UI programming?  blueArrow
10/28/2003; 8:34:55 AM (reads: 961, responses: 0)
If anybody finds the XML schema for XAML
Sorry. XAML Elements

Peter Van Roy - Re: XAML the future of UI programming?  blueArrow
10/28/2003; 9:30:58 AM (reads: 954, responses: 1)
XAML is a step in the right direction. The fact that it interprets a declarative description is an excellent idea. It means that one can potentially calculate UI definitions on the fly. XAML has a fundamental handicap though: its basic data structure is a character string in XML-like syntax. That is, it is flat (you need to use a parser to find the structure), it is awkward to embed language references inside it (they have to be encoded as character strings), it is awkward to represent shared substructures and cycles (again, they have to be encoded), and it has the verbosity of XML.

There are many languages with symbolic record data structures that don't have these disadvantages. This is well known in the functional and logic programming communities. Microsoft could have done a lot better than XAML by taking one of these. Using symbolic records for the UI specification means a tighter integration of programming language and UI. This is important, e.g., for building data-dependent and context-sensitive interfaces.

In Mozart there is a fairly complete tool, QTk, that was developed using this idea (see chapter 10 of CTM). It represents the static structure of an interface as a symbolic record and the dynamic structure as embedded objects and procedures. Since symbolic records are first-class data structures in Oz, this means that it is easy to calculate UI definitions on the fly.

Ehud Lamm - Re: XAML the future of UI programming?  blueArrow
10/28/2003; 9:37:11 AM (reads: 958, responses: 0)
they have to be encoded as character strings

Interesting you should say that...

Reminds me of the SchemeQL paper, where the authors argue that Scheme macros allow them to host SQL inside Scheme, without having to resort to "strings as the lowest common denominator" approach usually used for embedded SQL.

Isaac Gouy - Re: XAML the future of UI programming?  blueArrow
10/28/2003; 10:15:30 AM (reads: 937, responses: 0)
fundamental handicap... basic data structure is a character string
What if XML documents or document fragments become first class citizens?

Ziv Caspi - Re: XAML the future of UI programming?  blueArrow
10/29/2003; 8:23:58 AM (reads: 680, responses: 0)

XAML has a fundamental handicap though: its basic data structure is a character string in XML-like syntax.

How do you get that? From reading Petzold's article it looks like the opposite is true -- the XAML is just one of several possible representations for the same underlying model. (If you read that article carefully, it looks like even XML infoset is not used, as there is more than one way to represent a property in XAML.)