6 Replies Latest reply on Jun 16, 2008 2:36 PM by c_arango

    Flare vs Flex advise

    c_arango
      Hi,

      I am working on data visualization. I am building the prototype of a visualization using ActionScript 3 and Flex Builder. This is the first project I am working using this technology, so I would really appreciate some advise from a more experienced developer.

      My visualization involves box shapes that the user can move around, group and manipulate in different ways. As a base framework, I am using the flare toolkit ( http://flare.prefuse.org/). I am also building the prototypes using Flex.

      By reading the documentation of Flex, I have found that the framework has very interesting features that I would like to take advantage of. For instance, they have built in animated transitions and effects. It seems very suitable to build user interfaces. Flare, however, is built as a pure ActionScript 3 library, not taking advantage of the capabilities of the Flex framework.

      I have found the integration of pure Actionscript components with flex to be somehow problematic. Flare includes a component that allows a visualization to be included in a Flex application, but the scroll functionality does not work well. Whenever I include elements in the stage that are outside the canvas that should contain them, they are drawn on top of the other user interface elements instead of showing scroll-bars as one would expect.

      I also found that adding Flex UI elements as children to regular Actionscript Sprites is not possible because of the Flex life cycle mechanism. Although this is not a absolute requirement to my application, It would be a nice feature to have and will add more possibilities to my framework. The inverse, adding pure Actionscript 3 components to a Flex application, is possible, but you have to build adapters for them. The adapter that comes in flare is an example of this approach, and as I mentioned, has some problems. I am also experimenting with this approach, but my attempts have still some problems.

      I have 3 scenarios in mind for building my library of components. I am not sure which one is correct and if they are possible. I would appreciate some advice to pick the right one:

      1. Build my components using pure Actionscript 3 libraries. This is the approach that flare uses. However, it restricts me to use all the advantages of the Flex framework.
      2. Build my components as Flex components. This will solve the integration problems, but I won´t be able to use flare as a framework.
      3. Build components using pure Actionscript 3 and create Flex adapters. Using this approach, I could get the best of both worlds. However, the integration does not appear to be that simple.

      Another doubt that comes into my mind is the future of flare. I don't see a very active community around the project, which makes me wonder if there is another popular framework that leverages its capabilities.

      I would really appreciate your advice in this subject.

      Thanks,

      Camilo A.