Filed Under (AIR, ActionScript, Flex) by jonr on November-7-2008

I was talking with a Ryan Knight, a co-worker at Gorilla Logic, about our general impression of Flex.  We are both developing significant functionality with Flex these days, and we quickly agreed that are some real pain points.  I boil most of these down to immaturities, and do expect Flex to overcome most of these as the platform matures.

One of Ryan’s examples was the Flex Date class, which for some odd reason is final.  This is of course problematic, and a bit bizarre to have something like this be final.  This caused Ryan’s projects challenges because the default behavior was causing issues, and they had to override the AMF serialization to overcome the issue, which is overly involved.

A similar pain for me was ArrayCollection (see previous post).  In my previous post, I didn’t discuss our attempts to extend ArrayCollection to control the typing when they are created from our Remote call.  First off, I was quite surprised to realize that ArrayCollection doesn’t have its own interface, as my first attempt was to hold the data in an Array and lazy instance the ArrayCollection by delegating to a private ArrayCollection.  Second, I tried to extend and wanted to not call the super constructor, but this was problematic because the compiler inserts super even if I omit it. Anyhow, as each typical object oriented approach ended in a road block, it seemed to being highlighting a real immaturity.

I won’t bore you with all the issues we banter about, but it is important that Flex evolves in the next 12-18 months.  Also, I do respect how difficult it is to design a good API, and I am not claiming that I would fare any better.  All that said, I am hoping to see the framework take huge steps forward with next year’s Flex 4 release.

I hope you made it this far because I did bury the lead a bit… Ryan and I both agree we still love Flex overall, and that wealth of components still makes it possible to build things simply not possible in many of the popular Java frameworks.

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:
Matt on November 7th, 2008 at 11:15 am #

Just want to point out that ArrayCollection is an implementation of an interface, the ICollectionView and IList. So alternatives can be created that mirror the functionality. The only issue is in how serialization works from AMF, which I believe was part of your original problem.

jonr on November 7th, 2008 at 11:21 am #

ArrayCollection’s super class, ListCollectionView, does implement ICollectionView, but ArrayCollection itself doesn’t implement a collection Interface.

jonr on November 7th, 2008 at 3:39 pm #

Hi Matt, I forgot to say thanks for the comment. Also, I have been thinking through this more. If I had created a JonCollection class that implemented ICollectionView and IList and internally delegated the work to an ArrayCollection (lazy initing it / i.e. only instancing it the ArrayCollection object when it was needed). Then used that Object in my model (i.e. Team had an a member that was player of type JonCollection). Would the AMF serialization used my JonCollection rather than the ArrayCollection?

Post a comment
Name: 
Email: 
URL: 
Comments: