Tuesday, March 21, 2006

Flex2Beta2 released

Lots of changes between Beta 1 and Beta 2. One of the more interesting changes I'm looking to take for a spin is that data binding can now be done to properties. Couple this with the automatic conversion between cfcs and .as value objects and you could have some pretty slick auto-wiring in your app. Getting it to actually work is the next trick.

Another change that looks like it will save a lot of confusion is that addition of a ColdFusion Flash Remoting Service project option in FlexBuilder. It takes care of managing the flex-services.xml file for you. Cool.

There are tons of other changes to the mxml language which will probably disrupt at least a piece of any previous work you've done with beta 1. Definitely check out the bottom of the linked page to see the extent of your search and replace job.

Flex:Beta 1 to Beta 2 Changes - Adobe Labs

Tuesday, March 14, 2006

Flex 2 Style Explorer (beta) available

Thank you Adobe Consulting!

This is a fantastic productivity tool to help get your design work in Flex 2 (beta) jump started. You can use it to spend an hour or two and have a complete style sheet for you app done!

The consulting group asks that if you find anything strange with the app that you let them know. I've been through it a bit now, and it seems ready to go to me. The only thing I haven't found is an entry for the buttonBar, but it might be in there somewhere and I just haven't run across it yet.
Adobe Consulting: Flex 2 Style Explorer (beta) available

Monday, March 13, 2006

Getting CFC/AS Auto-conversion working

This is regarding Flex 2 Beta 1 and CF 7.0.1.

Concept
One of the new features with the ColdFusion Flex Connectivity is going to be the ability to have your value objects automatically converted between CFCs and .as when you move them back and forth.  It should be a very handy tool.  For example, you might create a user object in Flex and populate it with a username and password collected from a login screen.  Your remote object passes it to a cfc that looks up the user, validates any credentials and populates additional properties.  It then gets passed back to Flex (flash) and updates the original object you passed in.  You then can use the new property values in the rest of your flex app.

Problem
There are a few examples floating around that show you how to do this.  Ben Forta has a pretty detailed example on his blog.  I was also able to find an example on the FlexCoders list: http://groups.yahoo.com/group/flexcoders/message/28768

Both of these examples, while being very informative, sort of left me hanging.  The last step is to validate that you have received a typed component back in Flex.  For me, both of these came back appearing as cf typed objects.  However, in flex they were treated as generic objects and would not automatically convert into the corresponding .as object or populate its values.  The part that was difficult to find/notice was that the typed object that cf was returning was all lowercase, whereas up to that point, the component name and some of the directories were in mixed case.

Use of the c:\CFusionMX7\runtime\logs\coldfusion-out.log was instrumental in finding this bug.

Solution
I think this should be classified as a workaround at this point, since we're still working with beta software.  The mixed case issue for properties has been dealt with in CF by supplying metadata with the cfproperty tag.  Now, I think we need a similar approach for the fully qualified component path/type as well.

I was able to make it work by changing all of the component paths and filenames to lowercase.  Not a very elegant solution, but it lets you keep working.

I've posted about this issue in several blogs and mailing lists, but I've never received a response from anybody running into the same issue.

If there is some other issue that I've overlooked (my coding error, installation problem, wrong software versions, etc.), or if there is a solution in the works, please let me know.