“Avalon”che is coming – part 3 – Avalon Basics
TweetOkay, this series is back. 1. It has taken me a while to figure out if what I thought is a major limitation of Avalon is correct (Teaser#3 from previous post). Based on XAML’s design and the fact that JScript.NET is a supported language and my experience with Mozilla’s XUL (a XUL/javacript file can be rendered on the fly by Mozilla browser), i had assumed that you could write a XAML file with imbedded JScript and you could render the XAML page to the Avalon client on the fly much like an HTML/Javascript page is rendered by the browser. But as I started reading up on Avalon, I started to think that this was probably not possible. Here are a few examples that created the confusion in my mind. First, this article by Dino Esposito on MSDN is an excellent primer on Avalon. However, Dino mentions the following – “Today the list includes C#, Visual Basic .NET, and JScript® .NET. By the time Longhorn is released, other .NET-compatible languages are expected to be added to the list.” and couple of lines later says “Longhorn doesn’t process uncompiled code, nor does it have the ability to compile code on the fly.”
Second, Intel has a long article on XAML on their Developer Services site writtten by Peter Barnhardt of 3Leaf. Overall it is a good article to introduce basic XAML concepts. However, it has the following statement on page 3 “XAML is not interpreted at runtime as JavaScript* is; it is a compiled language. XAML-based applications do not suffer a performance penalty when you run them. In fact, XAML files compile to the same intermediate language (IL) as procedural code, so they appear no different to the Common Language Runtime (CLR) than any other program.” Fortunately, I stumbled upon ChrisAn’s write up on Dynamic XAML. My doubts were laid to rest – an XAML/JScript page can be rendered by the client on the fly ! But, wait, ChrisAn says “Parsed-at-runtime markup like Projection-based markup is supported, just not encouraged”. Not encouraged ! Please tell me what that means. It seems I am not alone in this. Dave Shea shares his worries based on his first look at Avalon. It seemed like his post touched off a nerve with 40 comments as on date. Will the real Avalon stand up please? 2. On the learning front, we will have to learn some new concepts for Avalon UI programming (Teaser #2 from previous post): a. First, read this MSDN article by Ian Griffiths of Developmentmentor on the Avalon Grpahics Model. Very lucidly written and I think illsutrates the “Vector” graphics idea verey well with examples. b. To understand 3D UI concepts, read this excellent 2 part article by Dan Lehenbauer. I guarantee Camera, Transforms, Viewport etc (remember MDI, modal windows anyone!) will permeate the UI development community and you had better learn. Also read this MSDN article on Avalon 3D. c. To understand Viewport, Camera etc. read this other superb article by Ian Griffiths on MSDN. d. I also found this Channel 9 video interview with Daniel Lehenbauer very useful to understand Avalon 3D. e. The other Avalon terminology to learn is VisualTree. This excellent article by ChrisAn and its pre-reading links within the article is a good starting point. Overall this rounds up the basics of Avalon. Up next: Strategic Implications of Avalon.