views:

482

answers:

7

Was talking to a colleague about XAML and how it is both a presentation and object description language and therefore quite unique and novel among IT technology.

Is this true that XAML is unique and novel?

Does XAML have any counterparts or predecessors in the Java world or elsewhere? I believe someone told me that Java Server Faces was similar to WPF, so what is the equivalent of XAML there?

I know MXML in Flex is similar but as far as I can remember there are some major structural differences, from what I remember MXML doesn't really describe objects but is more of a pure presentation XML.

A: 

Besides XAML, you have XUL which is used by Mozilla. SVG on the other hand, is one recommended by W3C.

Hao Wooi Lim
A: 

Well, XAML is basically advanced markup for .NET, therefore I think you can draw a lot of parallels from XAML to XHTML - Both being presentation techniques.

There's a lot of differences as well ofc (XHTML being interpreted by a browser to produce graphics, while XAML is being compiled into MSIL and relying on the CLR to do the graphics :) )

cwap
Xaml isn't a presentation oriented technology - it's also used to define workflows and services.Also, Xaml isn't compiled into MSIL - it's compiled to BAML. Sorry to heap this on there too but the CLR doesn't do the graphics - that technology is unrelated to the presentation stack (either WPF or SL) which is based on DirectX in the case of WPF.
James Cadd
Thanks for correcting me.. Had no idea I were this wrong :O
cwap
A: 

Mozilla created their UI description language XUL originally to be able to easily customize the UI of all of their products. Nowadays it's a package which can be included in other applications and also has an extended functionality.

Although XUL mainly focuses on UI representation it also contains other structures as Events and Scripts and Data sources. Nevertheless as far as I know XAML integrates these concepts much tightlier into their .NET (and attached) frameworks. But I'm not sure if this is enough to call it unique and novel.

Kosi2801
+1  A: 

**XAML, XUL, and XHTML Overlap**

The greatest overlap between XAML and other standards lies in its support for concepts drawn from HTML/XHTML. The similarities between XAML and HTML are numerous. Overlap with HTML is not limited to XAML, of course. The other well-known XML GUI dialect—Mozilla's XUL—also overlaps with XHTML. Finally, both XAML and XUL overlap in places that XHTML doesn't even include. XHTML and XUL can be combined in one document (at least in Mozilla browsers). Such a combination is a rough analog for non-Web uses of XAML. In fact, Mozilla's XUL alone is a rough analog for some uses of XAML.

but taken together, they really constitute nothing more than support for most of the basic HTML content and form widgets that are already routine in ordinary Web applications. XUL overlaps XHTML less that XAML does because XUL attempts to separate itself from XHTML. It's not trying to be a drop-in replacement, as XAML is.

One thing I do like about XAML compared with HTML is the increased freedom from the publishing-derived features of HTML. XAML frees you from h1 tags, code tags and a host of other miscellaneous niche tags used infrequently in HTML. For practical purposes, these tags act as little more than style information in modern HTML documents.

HTML is also a poor GUI for applications, despite the popularity of the Web. Both XAML and XUL go a long way towards rectifying that problem. You could re-write your Web applications in XAML and they'd look better than the HTML originals, if only XAML had better CSS support.

+9  A: 

This is a case of a general technology having such an overwhelming common specific usage that becomes synonmous with the specific usage. For example discussions of Javascript often assume the browser context and the manipulation of a HTML DOM without anyone having to expressly say so.

Stricly speaking XAML is nothing like XUL or SVG apart from being XML. XUL, SVG have a defined syntax for declaring User interface or graphical elements, raw XAML does not.

XAML can for example also be used to describe Workflows in Workflow foundation.

XAML is actually an approach to reading XML in order to describe types and properties of those types. For example a property of a type may be described either using an attribute or an Element as long as its name can be interpreted correctly. XAML also includes an extension the basic XML syntax where { } in an attribute can act as a short hand for a complex element.

I've not come of across this sort of thing before. All other XML based technologies come with a specific purpose, XAML is the first usage of XML I've seen that is deviod of any specific nomenclature but just a means of mapping XML to types.

AnthonyWJones
A: 

Cocoa from Apple, or event earlier NeXtStep had something similar long before XAML.

The GUI is created with an interface builder, which makes so called nib (Nextstep Interface Builder) files, which contains the layout, bindings, actions, outlets and serialized object instances. In the former time these nib files where stored in a binary file format, but nowadays it is also xml (xib).

So XAML is not the first not unique at all.

Enyra
Do I detect a hint of flame there? ;)
James Cadd
I work day for day with .NET and I really appreciate the XAML technology but I love Cocoa, Objective-C and the way of Apple.
Enyra
Not a flame at all, XAML is a serialized object graph, just like NIB files.
Paul Betts
+1  A: 

Read the comparisons to other presentation technologies with a grain of salt - Xaml is a method of constructing and composing .NET objects. That's in stark contrast to other systems that were designed as a way to build user interfaces. The nice thing about Xaml is that it's independent of the technology stack that its used for - it's a purpose-agnostic declaritive language more like C# than XHTML. In that way, it's unique.

James Cadd