Tyler Wright
unread,Oct 10, 2009, 11:24:57 AM10/10/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to reflex-steer...@googlegroups.com
Fair warning: I may be commenting on-list a lot today.
In reviewing possible implementations and our current code base I'd like to propose a change for simplicities sake. The current process for building a Behavior is to identify it's primary state properties (such as 'selected'), create interfaces for these properties (such as ISelectable), and have the Component implement these same interfaces. The Behavior's 'target' is typed as Object, so other properties have to be created for each Interface to gain any benefit from this method. And there is no method currently to validate whether a Component is compatible, no actual list of Interfaces to validate against. And then there's the extra file-size and clutter by adding so many of these 'property interfaces' to consider.
I propose we avoid these almost-arbitrary Interfaces and set up a simpler method, such as:
1) each Behavior implements a metadata-based hard contract with the Component, tagging the properties that are required to be represented by the Component. This would be familiar to the soft contract the Behavior has for the Skin, except that the Behavior throws an error if the contract isn't fulfilled.
2) as we discussed briefly at MAX, Behaviors implement their own data and are completely self-contained. Property implementation on the Component is then optional while a light databinding can connect it with the Behavior where properties do coincide.
I am begining some light implementation of a few known Behaviors in the manner of the self-contained data. This will be easier to build up, test, focus on Behavior functionality, and easy to refactor once we decide a final path.
Tyler