Network World article on XAML accelerating applications development
Network World, Technology Update, November 6, 2006
By John West, Technology Director Sitecore USA
Extensible Application Markup Language is the user interface markup language for the Windows Presentation Foundation, which is one of the pillars of the Microsoft .NET Framework. The concept is similar to the combination of HTML and JavaScript used in web applications today, but on a much larger scale.
XAML (pronounced Zammel) is a XML-based language optimized for describing graphically rich visual user interfaces, such as those created by Adobe Flash. In typical uses XAML files are produced by visual design and developer tools, such as Microsoft Visual Studio. XAML extends the functionality of XML, which was designed to store data, by adding the ability to define properties for user interfaces and events. This allows applications, which bring the Web and Windows programming worlds together, to be developed faster.
JavaScript-enabled browsers have allowed an incredible level of complexity in browser-based applications, often at the expense of writing code to build a specific application which can be quite challenging and expensive to develop, debug, test and maintain. XAML provides an abstraction layer which separates presentation from logic, allowing designers to maintain the overall design in XAML. Using XML markup, which is stricter than HTML, is a more natural fit for logical components while eliminating code duplication common to most Web solutions.
Some of the benefits of employing XAML architecture include:
- Increased visual consistency and productivity through component reuse and device independent markup
- Partnership opportunities – integration of third party applications is smoother
- Competitive advantages gained through use of future-facing technologies
- Faster, more capable browser-based applications incorporating technologies such as CSS, JavaScript and AJAX where appropriate
HTML was developed primarily for use on the Web, whereas XAML's principal target is applications that run directly on Windows. Unlike other markup languages, XAML is designed to integrate directly with .NET. Moreover, XAML browser applications are intended to combine the best features of Web applications and rich-client applications. As with a Web application, XAML applications can be deployed from a server to a system with a single click.
When distributing an application, the advantages of being browser based vs. locally installed are clear, including easier roll-out and maintenance. Consider an example of XAML in use with a browser-based Content Management System (CMS) with multiple, geographically dispersed editors. XAML provides, amongst other things, a Web-desktop, which lets the user open multiple windows in a single browser. XAML is used at two levels within the software; both for the CMS application itself, and for the Websites that are created using the software.
Within the CMS application, XAML is used to manage, customize and extend the browser-based user interfaces to the CMS repository. XAML components are compiled into.NET Common Language Runtime instructions executed by ASP.NET for maximum performance. Only with XAML could a CMS vendor build a user interface comparable to the Windows desktop itself, yet still run the application in a browser. This provides an extremely flexible interface, familiar to the users that can be quickly customized to the specialized needs without major re-programming.
In the development of customer-facing websites using the CMS, XAML presentation components are used along with standard ASP.NET technologies (aspx, ascx, XSL and web controls, etc.). Coding with XAML avoids the future burden of maintaining legacy code and enables the next generation rich Internet applications based on Web 2.0 and unencumbered by legacy web technologies.
A CMS is a perfect example of where simultaneous development of presentation elements by the design team, and logic components from the development team can be created in parallel with XAML, and then combined in a modular format to create an extremely dynamic application or website. Customization, changes, or upgrades can easily be applied to individual elements, logic can be enhanced or new presentation or graphical elements quickly implemented.
In view of the fact that the new Microsoft Vista operation system starts to blur the line between the Internet and Windows environments, XAML is increasing becoming an attractive option for the development of applications that also cross this divide.
Microsoft seems to be moving towards using other applications that generate XAML automatically, rather than promoting coding directly in XAML. However the ability of XAML to draw together .NET components and other XAML renderings in very simple process shows it a very strong tool in its own right and with an ever-growing pool of IT departments and designers creating applications directly in XAML the future of this language presents endless possibilities for all organizations.