| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45
Back To Interview list
Michael Smith cornered Christian Cantrell (virtually, that is,) about his CFUN- 04 talk, "Flash for CFers."
Michael Smith: Christian, why should CF programmers be interested in Flash?
Christian Cantrell: The first thing I want to say is that this is not going to be a session about why everything should be in Flash. Flash is just another tool to have in your development toolbox. When specing out a project and trying to solve technical or business problems, Flash offers you entirely new and unique solutions. Flash gives you options and flexibility, and as a ColdFusion developer -- or any type of developer, for that matter -- options and flexibility are very good things. The more options we have, the more clients we can service, the more money we can make, right?
MS: Tools are good! So for a particular application, can Flash be combined with ColdFusion or does it replace it?
CC: There are very few circumstances where Flash can completely replace ColdFusion. Flash is a client-side technology. It doesn't have the ability to save data in a database without the assistance of a back-end like ColdFusion. This is actually a pretty common misconception. I often see people worrying that ColdFusion is going to be replaced by Flash. That's not really possible. For application development, the two technologies compliment each other rather than compete.
MS: I recall that in CF 5 it took a lot of work to integrate Flash and CF. Is that still true in CF MX?
CC: With the introduction of components in ColdFusion MX (and their refinement in ColdFusion MX 6.1), the two technologies are very easy to integrate through either Flash Remoting or webservices.
MS: Flash remoting sounds a little naughty! Do we all see it in action?
CC: No, it all happens automatically out of sight. Flash remoting is a way to pass data back and forth between Flash and ColdFusion (or other technologies like Java, .NET and PHP), which is as simple as calling a function in ActionScript and returning data from a ColdFusion component. Behind the scenes, data is being serialized, sent over the wire, and deserialized, but from a developer's perspective, it's all very simple and straightforward. With Flash MX 2004, the same type of communication can be done with web services, as well.
MS: So roughly how many lines of CF code do I need to make this work?
CC: A minimal implementation can be done in three lines. One to open a ColdFusion function, one to close the function, and one line in between to return something. Writing components that talk to Flash is no more difficult than writing a standard ColdFusion component. Macromedia has done a remarkable job integrating the two technologies.
MS: And on the Flash site is the Actionscript easy to write to talk to ColdFusion?
CC: Admittedly, it's a little tricker than the ColdFusion code because Flash uses a concept of "callback" functions, which basically means that you define a function to be called when the data is returned from the server rather than calling the remote function and having the data returned immediately. It's a different model, but actually no more complex once you understand it. You're probably talking between seven and ten lines of ActionScript code.
MS: Wow that sounds like I could walk out of your talk and be able to code a simple Flash-ColdFusion application!
CC: That's the goal. My session will provide you with everything you need to know.
MS: Excellent, I am looking forward to trying out Flash with my CF. Thanks for talking with me.