Friday, March 11, 2005
« The future of Windows? | Main | Microsoft proposes patent reform »

I got this email based on a previous post on browser vs rich clients:

 

I read your comments about smart clients and Google maps. What do you think about XAML + Avalon, is it the MS’s recipe to kill HTML browser? I don’t see how it is a strategic advantage for MS, it is a replicable technology, I bet open source groups will come up with a Mozilla plug-in that is interoperable with that standards.

 

This question stems from a common misconception, which is that XAML is similar to HTML and is sent to the client where it is parsed and run.

 

In reality, XAML never leaves the server. It is compiled on the server into a .NET assembly, and that assembly is downloaded and run on the client. While this is replicable, it isn't the trivial task some people think it is.

 

Either you would need to replicate the .NET runtime and DirectX on the client so you could run the compiled assembly, or you'd need to build a XAML compiler on the server that generates a downloadable executable code module for your platform.

 

For instance, one could envision a XAML compiler that created some sort of compiled code module that could run on Linux, using OpenGL or some other 3D graphics library on that platform. But this is a non-trivial task, since XAML is designed with the assumption that the target platform has the .NET runtime and DirectX, so the compiler would need to map all the .NET and DirectX functionality into equivalents on some other target platform.

 

More realistically, you might envision something like mono being extended with Avalon support so it could run the pre-compiled .NET assemblies on non-Windows platforms. Even this is very non-trivial, since they’d have to not only replicate Avalon, but mediate the differences between DirectX and OpenGL or some other graphics library.

 

There are a couple examples of similar technologies available today. Most notably OpenLazslo and Xamalon. They illustrate the basic concept involved, which is to compile the XML into a binary, which is then transferred to the client and executed.

Friday, March 11, 2005 10:12:11 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  |  Tracked by:
"Rocky Has A Good Take on XAML/Avalon Replication" (SlickThought.Net) [Trackback]


Friday, March 11, 2005 1:27:34 PM (Central Standard Time, UTC-06:00)
Why can't the server send XAML instead of compiled assembly? Then the client can do whatever they want, to use it to create a display, be it .net or mono on whichever platform.
Is that not possible? I recently read about ajax and couldn't XAML be used in a similar manner? So that the app can communicate with the server via web services or something and have XAML sent to render on the client?
Friday, March 11, 2005 2:19:18 PM (Central Standard Time, UTC-06:00)
It is important to realize that XAML is a markup language to describe a form. The events on that form are handled by VB or C# code. The model is quite similar to today's Windows Forms in that regard - with real-time high-granularity events from the display back to the code.

Unless someone can come up with a way to get arbitrary VB and C# code translated into JavaScript (including any and all .NET runtime calls) there's no realistic way to get a XAML/Avalon UI "interpreted" by the client.

Either that, or you could perhaps get the display only part interpreted on the client, but it wouldn't actually WORK, because none of the event hookups would exist and so the UI wouldn't be able to respond to the user's actions.
Tuesday, April 18, 2006 1:48:02 PM (Central Standard Time, UTC-06:00)
Assuming that the client is a Windows XP or later machine, is it possible to run a XAML client that talks to a non-Windows server, using HTTP, or Web services?
Aneesh Shrikhande
Comments are closed.