Stuff to click on

Tuesday, March 6

360flex - Flex with ColdFusion

presented by Ben Forta

(Note: he has a really cool logo on the preso title screen, with the Flex and ColdFusion logos morphing together. Cheezy happy moment!)

Brain dump stuff

Talking thru various Flex and CF integration good stuff, including FDS integration with CF.

CF and Flex were designed to work together so they compliment each other.

Flash remoting, FDS adapter, messaging gateway (CF enterprise edition only) ... all part of the CF integration package.

RDS integration includes file system, data source, sql query builder, and service browser goodies.

CF and FDS2 are both Java apps running on the J2EE Server.

Try Flex online at !!

Flash Remoting

Flash remoting (required for CF/Flex integration) is built into CFMX 7.0.2 with no plug in's or extras to install.

Use RemoteObject to access your CFC's. Please. :) More efficient because of the binary protocol used (AMF3) and there is no FDS required.

The CF application wizard in FB2 is really slick. There is a lot of good info about using this on the Adobe website and Ben's blog so I won't post details here. If you are starting to use CF and Flex together this is a great way to go!

CFC and AS class must have the same properties, so use the tag in your CFC. Use the full path to the CFC with a fully qualified dot notation path. AS object needs to be associated with the CFC - use the [RemoteClass] with the fully qualified path to the CFC. Or... things may work... or not. Remember that even though CF is case insensitive, AS is case sensitive ... so spelling and case (and day of the week and the current ambient temperature) all matter because AS is picky. :)

Flex Messaging

Server initiated communication (as opposed to client request). Publish & subscribe to "push" data to anyone monitoring a "channel".

Uses RMI Registry (must enable FDS via CF server admin first) to connect CF to the messaging gateway.

It is really slick - the push is immediate and doesn't depend on polling or waiting. All initiated by the server, a la "hey all you sessions that are listening, here is the new data you need to display". Cool!

Configured as an Event gateway in CF admin, just needs to be running and connected.

All this integration is really easy with Flex and CF. Connection with Java, PHP, any other backends will require more work!! (So.. another benefit to using CF!)


By default, Flex and CF will only accept connections from the same box.

You can configure a list of allowed IP addresses for both sides if CF and FDS are on different boxes.

FDS Data Sync

Eliminates data versioning problems - the "whomever saves last, wins!" scenario. Server will detect a conflict and raise an alert giving developer ability to code message box to allow the client to decide what to do - or deal with the conflict programmatically.


No comments: