First off, thanks a ton for inviting me to be in this group! I think
those are great goals! One other goal that I think has been an
important part of Flex's success is the overridability / hackability of
the framework. Unfortunately in Flex the primary method of doing this
is monkey patching. But at least we have an Escape Hatch (to use Bruce
Eckel's term). I believe every successful framework / platform has a
great and well thought out Escape Hatch. I've thought about many ways
to do this well in an AS3 framework... Compiler tricks, Dynamic
Proxies, Categories (like in Objective-C), Composite Oriented
Programming (like in Qi4J), etc. But I haven't figured out the right
way to make it work in AS3. So this could be challenging but I think it
would lead to the kind of emergent growth we all envision for Reflex.
Thoughts?
-James
a. I see Behaviors as logic that could be attached to any object. Controllers are more specific behaviors that are attached to components.b. For example, you might have a <Expandable target="{detailsText}" trigger="{moreDetailsButton}" expandedHeight="500"/> behavior that is used in your view.c. A controller's target must implement IComponent and uses custom metadata to inject view elements and add listeners (exactly like OpenFlux).
2. Skinning/Styling/Themesa. It should be easy to not only change the skin of a single component but also swap out all of the default skins with your own.b. If you specify your own theme/default skins the default Reflex skins should not be compiled in.
c. Jacob's CSS without Flex example was great and should definitely be utilized.
d. Look in to whether we can utilize the new Flex 4 states syntax. If not at least make it easy to specify up, down and over states.
3. Invalidationa. We should probably use the same component life cycle as Flex components (createChildren, commitProperties, measure, updateDisplayList)b. It would be nice if we didn't have to have the same min, max, explicit, measured width/height properties as Flex. Possibly a bad idea though since I'm not sure what issues that would cause.
Hey Ryan,
Great points. Here are a few thoughts.
1. Attaching Behaviors / Controllers - I don't think I want these to be different things. Behaviors are pretty much like Controllers in OpenFlux, but can be assigned to any object. The behavior might have expectations of the target (implements ISelectable, IList, etc), but if the target doesn't meet those expectations it basically just doesn't do anything. I think it would be confusing to try to seperate out these concepts. You could still implement an IBehavior that just doesn't use the metadata and such though.
2. Skinning/Styling/Themes - I agree with all of this with a few notes of caution. I think we need to make sure we support using custom skins (without compiling in the defaults) without requiring CSS. Basically CSS features themselves should not get compiled in unless you use CSS. So, no default.css in Reflex hopefully. Let's see what else we can come up with first at least. Also, on "d" I agree we need to look at this pretty soon. I have a feeling it will be difficult to support this because of the code injection going on, but we'll have to dig in and see.
3. Agreed. For the most part I don't have any problem with Flex's Measurement and Invalidation model. We'll want to define interfaces for these properties so they're optional in Reflex, but I think it'll largely be the same so far.