Flex Pasta » 2008 » November

Today I was at Adobe MAX in San Francisco.  I attended 4 sessions.  Here is what they covered and my feedback.

  1. Ely Greenfield’s session on the next version(Gumbo) of Flex.  Very well organized and presented.  The next version of Flex is basically a complete rewrite of Flex 3.    It involves seperating the data and functional pieces of the Flex framework from the visual appeareance.  Sounds very interesting, but Flex 3 to Flex 4 won’t be an easy upgrade.  One other note about Flex 4 Gumbo is that two way data binding will be supported by the Flex compiler.
  2. The Flex Architecture Faceoff -This was just a debate on the different frameworks such as Cairngorm, Pure MVC, etc and what people did and did not like. Some of the panelists preferred no frameworks! My favorite quote of the session was from Yakov Fain - “I didn’t like Cairngorm until I learned Pure MVC”.   A good middle ground between Cairngorm and no framework could be Penne?
  3. Cocomo SDK - Cocomo is a new SDK built by Adobe on top of the Flex SDK for real time collaboration apps with RMTP using cloud computing.  Very cool presentation to show developers how to start using the Cocomo SDK.  This is something I will try out.  I am still a little skeptical since it is only a beta release, and the potential problems with a re-written Flex 4.  I also wonder how upgrades to the Cocomo cloud avoid breaking the clients running on an earlier version.  I see some real world applications for Cocomo, though I would have liked to hear about the pricing model!
  4. Filthy Rich Graphics with Chet Haase - Very well organized, fast paced, yet easy to understand.  I learned a lot about how animations, effects, etc works under the covers and the thought process that goes into coming up with great effects.  I think this was the most enjoyable session of the day.  Check out the new Mirror effect in the Flex Gumbo SDK.

At the end of the day I got to meet some members of the Flex SDK team…Matt Chotin, Ryan Frishberg, Joan Laferty.  Nice to put faces to names in the bug database!

I was creating a custom component today.   I wanted to declare the component in mxml, but the component was not a visual component, just like the RadioButtonGroup class.  To create a non-visual component in mxml, just have the component implement the interface mx.core.IMXMLObject …. or so I thought.  Here is my component:

package
{
import mx.core.IMXMLObject;

public class MyNonVisualComponent implements IMXMLObject
{
public function MyNonVisualComponent()
{
}

public function initialized(document:Object, id:String):void
{
}

}
}

When I try and use the component, I get an error: Component declarations are not allowed here. (Note: visual children must implement mx.core.IUIComponent)

Wait a minute, I used the  IMXMLObject whose interface states:

The IMXMLObject interface defines the APIs that a non-visual component must implement in order to work properly with the MXML compiler. Currently, the only supported method is the initialized() method.

This is exactly how the mx.controls.RadioButtonGroup class does it too(Check out the source of it if you don’t believe me)!!!   So after an hour trying to figure out why something so simple doesn’t work I found my answer deep inside the compiler source code.  It appears the compiler gives special treament for RadioButtonGroup when it compiles instead of to IMXMLObject.

In flex2.compiler.mxml.builder.ComponentBuilder.java:

else if ((standardDefs.isContainer(parentType) && childType.isAssignableTo(standardDefs.CLASS_RADIOBUTTONGROUP)) ||
(child instanceof ReparentNode))
{
ComponentBuilder builder = new ComponentBuilder(unit, typeTable, mxmlConfiguration, document, component, null, null, true, null);
child.analyze(builder);
}

Therefore, unless I am missing something, I can’t create a non-visual component for mxml.  Thought I’d pass this info along to anyone else who is banging their head against a wall!

I opened a ticket with Adobe to fix the problem.