Sweet Gumbo/Spark interfaces

Hooray for the Flex team! They’re coding to interfaces. I’ve been looking through the source of recent Flex 4 code and I have to say, I’m getting excited to use this stuff. Here are a few of the things I’ve found with just a few minutes of going through their code:

IDeferredContentOwner – The current version of Flex has something like this, but much more complex. This interface makes sense, and simply allows the deferred creation of its children when they are needed (such as a ViewStack in the current Flex). Just a couple of properties and it allows the component to figure out how to do it.

IViewport – This allows any component to have scrolling. What a step forward from the current monster called Container which we probably use more than any other component for layouts (e.g. Canvas, HBox, VBox).

IGraphicElement – This interface is pretty sweet. It allows 1) objects to be drawn on the same DisplayObject (e.g. several Rects could all be drawn on one Shape) and 2) it allows non-DisplayObjects to be used as children of Group by providing their own DisplayObject. I can think of some pretty fun things to do with that as far as custom components/functionality is concerned. :) Maybe I’ll join the OpenFlux initiative and talk more with Ryan Campbell and Ben Stucki about this one.

There’s some good things cooking in the Adobe kitchen. I’ll write about more as I discover it.