Filed Under (ActionScript, Flex, General, RIA) by jonr on June-30-2008

I have finally gotten the chance to immerse myself in Flex code lately. I decided to do this series to capture my first hand experiences with Flex. Please share your feedback on the challenges and strengths I highlight. I would love to know if your experiences differ, or if you can fill in some of the gaps where I might be missing something. For those of you considering Adobe Flex, hopefully this will give you an accurate picture of building applications with Flex.

The true object oriented nature of the Flex components is excellent. I am sure there have been a number of “real” UI frameworks over the years that did things like this, but I have never had the opportunity to work with one…. So, being able to actually apply OO principles to UI development has been a pure joy. In addition, the Flex framework provides virtually every component I could ever imagine being needed for enterprise applications. This was always a huge challenge with Java web frameworks, as they always seemed to depend on the community to fill the “gaps,” if you can call the components of UI framework, the “gaps.” Anyhow, there are a few issues that seem to come out of the maturity questions I raised initially. For a few examples:

  1. The default button implementation does not offer the ability to wrap the text. The fact that the components are really OO paid off here, as we were able to extend the core button and add this functionality. It was nice to be able to be able to work around the limitation this way, but this is clearly a common thing that people would want to do with a button.
  2. We have been experiencing general difficulty with the ComboBox. It was surprising to have to set things manually – not being able to provide a reference that has the same value, but having to find the actual object in the list and provide him for setting the selected object, etc… The data grid layout breaks out of the columns on us when our custom ComboBox is clicked on… just weirdness.
  3. Another surprise was that there was no default option to allow users to resize the default components. This would seem quite natural for an animation engine. Anyhow, we used the following to implement resize on our custom title window pop-ups: http://myflex.wordpress.com/2008/03/05/resizable-collapsable-titlewindow/. We made a few tweaks for our custom needs, and did our best to hide this in our implementation so we can easily replace it if we find a better implementation.

Also, here a quick link on styling – since it took me a while to find this: http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html.

Click here to subscribe to my RSS feed and follow the rest of this series along.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn

Comments:
Jon Rose’s Blog » Blog Archive » Life with Flex on June 30th, 2008 at 12:02 am #

[...] Life with Flex: Components (Monday – 6/30) [...]

Stu Stern on July 19th, 2008 at 1:15 pm #

After doing a fair amount of battle with Flex components, it’s become clear to me that trafficking in anything other than Strings should be avoided.

Specifically, when using a ComboBox as an itemEditor in a DataGrid life is much simpler when the dataProvider for the ComboBox consists simply of Strings. We had originally bound the ComboBox’s dataProvider to an ArrayCollection of objects and used the “labelField” property to specify which value should appear in the list. Surprisingly this entails all kinds of weird voodoo coordinating values between the itemRenderer and itemEditor.

Assuming the “values” property below returns nothing but an Array or ArrayCollection of Strings, the following works as expected:

Note that setting editorDataField=”selectedItem” is a critical piece of voodoo in the above.

Post a comment
Name: 
Email: 
URL: 
Comments: