With the release of the ColdFusion 9 beta I thought I'd share a few of the Flex integration improvements I've been checking out this week. First, ColdFusion 9 now uses Blaze DS to power Flex remoting and messaging. ColdFusion has had remoting support for several versions, but before CF 9 you had to install LCDS or BlazeDS to get Flex messaging. With the move to Blaze DS there is no longer an integrated LCDS Express installation option, so if you want RTMP or data services you will have to buy a separate LCDS license or install the free LiveCycle Data Services ES Single-CPU License version yourself. I know some people feel this is a loss but I'm pretty happy having messaging available out of the box, without the single CPU limitation.
Another big improvement is that ColdFusion now correctly serializes CFC relationships to AMF. Previously, recursive or repeated object references were not correctly serialized. For example, serializing the the following object graph via CF would result in the child object being null for the father object when received in Flex.
child = createObject("component","child);
family.mother.child = child;
family.father = createObject("component","parent");
family.father.child = child;
This was a huge issue that made ColdFusion almost unusable for serious OO Flex work. I'm very glad to see this fixed.
Another small enhancement to Flex messaging support is that the CFEventGatewayAdapter now supports selectors for message filtering. So in addition to using subtopics, you can now filter the messages a flex consumer receives based on message header values. For more on message filtering be sure to check out the BlazeDS Developer Guide.
Flex remoting is also reported to be much faster in ColdFusion 9 due to optimizations in the AMF serializing/de-serializing process, although I haven't tested this.
With all the Flex improvements the big thing that is missing from ColdFusion's Flex integration is lazy loading of Hibernate objects. Given how much Adobe is hyping Hibernate ORM support I'm surprised this isn't in ColdFusion 9. It would certainly make a compelling argument for powering your Flex applications with ColdFusion. There are actually a couple of bugs/enhancements logged for this, #76073 and #77738, so if you plan to use the new ORM features with Flex I encourage you to comment or vote on these issues.
Finally, I also ran into one backwards compatibility issue. Previously, when working with the Data Services Messaging Event Gateway the keys to the CFEvent structure passed into the onIncomingMessage event handler were not case sensitive. It seems that in CF 9 the keys in the body of the event are now case sensitive while keys in the event headers are not. I've logged a bug for this, #79712, if you would care to comment or vote.
I'm sure there are a lot of other improvement to ColdFusion 9's Flex integration that I'm missing here so if you know of any, or have any bugs/enhancements you would like to mention, please share.