Tag Archives: XAML

UI Smackdown: Session 3

XAML/MXML: Why both?

I'm always curious when we have competing standards emerging, and I wonder how that happens, and why.  So, since we had people who were knowledgeable about both Flex and WPF at the UI Smackdown, it seemed reasonable to explore this issue with respect to XAML (Microsoft's XML scripting language for use with WPF) and MXML (Adobe's XML scriptiong language for use with Flex).  How similar are they?  Do they strive to solve the same problem? Will one standard emerge?

MXML is Adobe's markup language. It's essentially a DSL (domain specific language) for ECMA script.  You write MXML and it compiles into Action Script.  It has a familiar feel to HTML.  Used for layout.

ActionScript is used for all procedural components.  In Apollo, ActionScript compiles to byte code on the server.

XAML is Microsoft's markup language.  You use it to write WPF applications.  Instead of ActionScript, procedural components are written in C# or VB.NET.  XAML is not just for WPF.  It's a serializable format that can be used to:

  • serialize event wireups
  • refer to other objects in serializing code
  • serialize property injections
  • add properties to a language

You can pull in more than just state with XAML.  WPF and WF use XAML (and other technologies will as well).

Thus, MXML is really more specific to layouts, while XAML manages serialized formats.  The general consensus from both vendors is that the technology needs to mature before it can be standardized.  It's hard to work with other primary vendors while trying to innovate (e.g., XUL, SVG).  It's better to give the technologies time to mature and then let them come together.

With that understanding, we moved on to what some described as the "real" question.  The tooling on top of XAML and MXML is really the key, not the underlying technologies that implement it.  So the real question is: WPF/E or Flex? 

In designing tools toward productivity in developers, Microsoft has the edge.  Adobe's process is more manual, but this will be addressed in Flex 3.

Microsoft's Expression UI writes to XAML source files in the same project as Visual Studio Developer.  On the other hand, pure designers feel more comfortable using Photoshop, so Adobe certainly has an edge there.

For now, the jury is out regarding which to use.  As they both mature, this will be interesting to watch.

Adobe's markup language, used to build Flex apps
Microsoft's markup language, used to build WPF apps