Hello,

Gerald wrote:

> If anyone looks into Adam's XAML parser let us
> know how it comparse to MyXaml for example.

Adam has implemented a very interesting solution to the problem if matching
element tags to classes.  In MyXaml, for instance, you have to specify the
namespace in which the class is found.  Adam's approach is to use a factory
pattern for each different namespace.  For example, a System.Web.UI factory
is different from a Systems.Windows.Forms namespace factory.  The factory is
instantiated via a separate configuration file and an IFormatter interface.
Properties are handled similarly.  Each factory implements setters and
getters for the namespace that it implements.

This advantage with this approach is that it allows one to use the same
markup to generate a UI on different platforms--client, web, mobile, etc.  

The disadvantage with this approach is that each target namespace requires
implementing a factory and the property getters/setters associated with that
UI.

With MyXaml, I specifically avoid any knowledge of the namespace and the
classes/properties that are implemented in that namespace.  Even custom
handlers for non-XAML compliant classes and properties are instantiated in
such a way that the parser itself is oblivious to the implementation
details.  As I've mentioned before, the beauty of MyXaml is that it can
instantiate any well-formed XAML compliant class.  Adam's implementation is
rather locked in to UI specific instantiation.

Adam's approach is definitely quite interesting.  In particular, the ability
to alias element tags is very nice.  This lets you translate, using a lookup
table, Avalon XAML tags, such as Canvas, to .NET classes, such as Panel.  

It'll be interesting to see where he takes his implementation.  I'm curious
how support for events, general IList/ICollection management, and data
binding will be handled.

Marc 



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xul-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xul-talk

Reply via email to