Friday, October 06, 2006

XAML - Microsoft's new markup language

EXtensible Application Markup Language (XAML) which is pronounced as Zamel is Microsoft's new markup language to define dynamic or static user interfaces for .NET applications.  XAML will be used in Windows Vista to design user interfaces, but can be applied to Windows XP or Windows 2003 as well. XAML comes to separate the UI code from application logic code and is very similar to MVC.  XAML is tied to Windows Presentation foundation (codenamed Avalon) to build a whole user interface in .NET 3.0 and Windows Vista.

XAML is an XML child indeed.  Every XAML code must be a well-formed XML file and XAML inherits all XML definitions and rules.  We can consider it as the last part of a chain that contains HTML, XHTML and other markup languages for UI.

What makes XAML different from other XML children is what it represents.  Every XAML element represents a .NET CLR class.  This lets you to extend and work on XAML easily. The model that XAML in conjunction with Windows Presentation Foundation provides to let developers design a rich user interface is similar to code behind and code inline model in ASP.NET. This means you can put your application logic in a separate file or embed it inline in XAML file itself. XAML files will be compiled to BAML files.  The advantage of BAML is it is smaller than XAML and is easier to read so it is faster to load.

Advantages of XAML

In addition to all benefits that XML or actually a markup language provides, XAML has some major and minor advantages; some of them are here:

· Designing a user interface is easier with XAML.

· Code for XAML is shorter than code for previous UI designing techniques and you will see it in action.

· XAML designed user interfaces are easier to transfer and present in other environments.  For example, you can present your UI on the web or a Windows Client easily.

· Designing a dynamic UI is absolutely easier with XAML.

· XAML enables a new world for UI designers and lets all designers build user interfaces without having any knowledge about .NET development.  This helps end users to see better user interfaces in the near future.

XAML Development Tools

To start developing for XAML and Windows Presentation Foundation, you need to have some tools in hand.  Do not forget that this article is written some weeks after the release date of .NET Framework 3.0 RC1.  You can start developing XAML and WPF on Windows Vista, Windows XP or Windows 2003.

You need to download WinFX SDK and Visual Studio 2005 Extensions for WinFX.  Although by installing WinFX SDK you have a cool tool to develop for XAML, Visual Studio Extensions can enable a visual designer and Intellisense, and great debugging features.  I recommend downloading VS 2005 Extensions for WinFX if you have it installed on your system.

Of you do not have it, do not worry because WinFX SDK comes with an editor for XAML which is named XAMLPad.  This editor lets you to type and edit XAML markup then it generates the UI for you.  It also has some debugging features.

There are some other tools available by Microsoft or community for XAML development:

· Microsoft Expression "Sparkle Interactive Designer"

· MyXaml

If you are using some tools like XamlPad to write your XAML codes, you can use MSBuild to compile them, but if Visual Studio is your primary IDE for this purpose it builds them on the fly for you.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Comments on "XAML - Microsoft's new markup language"