Markup-based UI

10/27/2003 2:23:00 PM

Markup-based UI

One of the most exciting things coming forth in Longhorn in the ability to use markup to describe the user interface. Longhorn adopts as its own many concepts from Web. Web-based applications are easier to develop, deploy and use. Desktop applications have their advantages, too, such as their richness, performance and access to the platform. Longhorn blends the two models into one.

One of these concepts borrowed is a markup language, called XAML, which Microsoft took and refined beautifully. As a UI language, XAML is richer than HTML. Because it's on the desktop, it can be compiled, take full advantages of the new Longhorn graphics and media subsystem, and produce effects that once required Flash. Because it is easy to use and concise, it promises to make multimedia-rich applications, not just common, but standard in the desktop.

I saw a post that presents a misleading description of XAML in LonghornBlogs.com, as if the author of the post has never used XAML. The description has caused some confusion. He is actually describing XUL, which is very different. XUL is similar in that it is based in XML and is used to describe the interface.

First of all, XAML is unrelated to Internet Explorer. It can be hosted in IE, but so can Word and Excel. I believe the approach to browsing is the same as the Office apps, using Active Documents.

Ryan mentions that XAML uses CSS and Javascript. While XAML supports styles, it does not support CSS. Also, XAML supports any .NET language, but there is no special support or preference for Javascript; more likely code behind XAML will be written in a more performant language, C# or VB.NET.

Also, Ryan also mentions that XAML is used to create applications in the browser. This is not true, but it also not completely false, since an application can be simultaneously deployable as a stand-alone executable or a browser-based application. The new programming model reduces the dichotomy between the web and desktop.

WIth XAML, you can declaratively specify a user interface, but I don't think it is limited to just user interfaces or Avalon, for that matter. The markup language is tightly coupled with .NET. Elements correspond to CLR objects, and attributes correspond to properties and events. XML namespaces may be used to correspond to CLR namespaces. It's like a new serialization method, that can be compiled or constructed at runtime. You may even be able to construct an arbitrary object tree with it (even a WinForms UI).

There are more errors in Ryan's post, but I just wanted to shoot the post down. I am not an MS employee, and this post may also have errors. These are my own opinions.

Comments

 

Navigation

Categories

About

Net Undocumented is a blog about the internals of .NET including Xamarin implementations. Other topics include managed and web languages (C#, C++, Javascript), computer science theory, software engineering and software entrepreneurship.

Social Media