> The seriliazer already plays the initialization role. 

The serializer is the creator and the initializer. In the model you suggest, it 
is only the initializer - the new keyword is used to create the object. This is 
inconsistent. If you only need initialization, you should use the bind() method.

> My understanding is that skins are views. Components are model/controllers.
> The view should not be loading user data and other child content into the
> mode/controller so I'm not sure I would agree that the skin should be doing
> this at all because part of the initialization is also Component data such
> as userData.

Skins shouldn't get involved in the model data, but they are allowed to add 
sub-components. For example, all composite component skins do this (Spinner, 
ScrollBar, Frame, etc.).

> With the editor, there are a few ways to do this. This is actually a very
> direct approach. In the thoughts below, I am still forced, at a minimum, to
> use an interface and for me to write code for wiring. I'm not against
> writing code but when the serializer can do it naturally, that's a win.

The problem is that the suggested modifications to the serializer are not 
natural because they don't fit in with the overall design of the framework.

> It took me awhile to understand why I
> had to always had to do extra work with includes or setting left and right
> children in code until I realized that the serializer should be doing it for
> me.

Again, in frameworks that compile to classes, this makes sense. When I define 
MyClass.xaml and MyClass.cs, they are both combined such that the following 
both instantiates and initializes the class:

  MyClass myClass = new MyClass();

But this doesn't work for BXMLSerializer.


Reply via email to