bpurcell.org - ColdFusion and Flex Integration
  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      

Subject Archives
Amazon EC2 (15)
ColdFusionMX (155)
Corvette (3)
Flash Lite (4)
Flash Media Server (5)
Flash Player (3)
Flex (39)
General Web Dev (14)
HDTV (3)
Jboss (1)
Jquery (2)
JRun (59)
Max 2003 (3)
Other (33)
PC Hardware (16)
Software (17)
SpatialKey (7)
Wireless (8)
Working Out (1)

RSS Feed
Feed Listing

Site Contents
My Blog
Wireless & Networking
Hardware & Gadgets
Software Picks
Contact Me

My Articles & Papers
Flex Performance
mm.com Under the Hood
Multiple Instances of CFMX
Multiple Instance Config
NLB with ColdFusion
Clustering CFMX for J2EE
Multi-Tier Hardware LB w CFMX
Cisco CSS & Coldfusion MX
JRun 4 Jini based Clustering
WiFi Growth

2ID Tacweb

Other Hobbys
Body-For-Life Challenge

Personal Projects
Family Pool
Deck Gate


Viewing Individual Entry / Main
April 29, 2005

Over the last few months I have blogged very little due to time constraints, travel and vacation. I have been working on the Flex team for about a year and a half now and still continue to do ColdFusion development anytime a chance arises. I have seen a lot of questions recently about ColdFusion and Flex integration and my goal for blogging over the next few months is answering a lot of the common questions.

  1. Deployment options - seperate instances, single instance (deployed as a singe web app, deployed as a seperate web app)
  2. External Webserver configuration options (IIS & Apache)
  3. Data integration (HTTPService - XML, Webservices, RemoteObject (examples and gotchas)
  4. Authentication and Authorization

I am looking for other questions that I can answer as well and can put together code samples. I might even turn this into a dev center article if I can pull enough content together. Please post your comments or thoughts.


Since you can get ColdFusion with JRun4 for less than getting them seperately, I can see why this might be a popular option. I've found that ColdFusion 7 plays much nicer with Flex than 6.1 did.

Where my understanding breaks down is the integration with the web server.. If I install ColdFusion and set the context root of the CF server instance to /, the cf? files in wwwroot (for IIS6) process fine.. Of course mxml files in wwwroot don't.

Is it possible to have it so both sets of files (mxml and cf?) all live in wwwroot (under seperate directories of course)? Is it even advisable?

Looking forward to your thoughts!


Yes, you can run cfm and mxml pages under your webroot once you've integrated Flex into the ColdFusion server.

I've been using just such a configuration with CFMX7 with the J2EE installation option under Windows 2003 Server with IIS6. With the enterprise version you also have the ability to use JSP pages as well as use the CFIMPORT tag to import the Flex mx libraries, letting you use cfml as a wrapper for flex content. And to top that off, I've got all that running under a VMWARE5 session.


As far as examples, I'd like to see a code sample based on conditional mxml component instantiation using a security roles model with CFMX, this would include various pods being delivered/hidden as well as alternate menu selections based on the logged in user's access. I've got some of my own ideas on how I'd do it, but I'd like to see some other peoples take on it.

I am looking forward to your posts. Excellent topics.

Christopher, that's great. I wouldn't mind knowing how you set that up (did you have to deploy Flex into the ColdFusion server instance in JRun, or did you have them in seperate instances?).


I deployed flex into the coldFusion server instance, but you you have tom manually merge the config files. Just follow the directions in the Macromedia technote. http://www.macromedia.com/support/documentation/en/flex/1_5/flexforcf.html

As far as the Flex samples, I suggest keeping those separate. Just create a flex samples server and hot deploy the flex samples war file.

Passing complex objects between Flex and CFCs, such as an implementation of the value object pattern. Using Flex with the CF7 event gateway. Embedding a Flex app in a CFML template, and passing data between the two at runtime via Javascript. Authentication and authorization.

With respect to authentication and authorization using CF (cflogin) and Flex, I've posted an approach and some sample code on my blog at: http://tomlink.net/blog/index.cfm?mode=entry&entry=AB351707-7E97-A3B0-E2E1018979B5B3D1

Cool. Well I definitely would like to see more on the CF7 integration situation. I haven't had the chance to test CF7+Flex. Most importantly I need to find out if your .mxml and .cfm files can live in the same directory. From what I understance because of context root issues, that won't work. All your flex stuff has to be under a different structure. I hope that's not the case.

Complex variables/objects/models is a definite.

We have a large CMS system we built in CF, so we're using Flex to complement that for more complex modules. The CMS system is based around the user. It authenticates users using their Windows login, then sets up a session structure. Would love to know what the best approach is to enabling Flex to being aware of your CF app's user (similar to the authentication suggestion). Right now on our links to Flex apps we pass in the url the userid and a sessionid, and Flex then calls a CFC which verifies that that combination is correct. But with Flex and CF on the same webserver...it'd be great if Flex would automatically retrieve some of that info and pass it to the CFC (eg cookies?). Or is there some built in way for the Flex server to access the Session vars of the CF server.


Hi - I'm *brand new* to Flex, and am very excited about RIA. I've hated static-HTML apps (read: boring, non-intuitive, hard to develop, etc...) for so long I've focused my engergies on the back end, specifically in the database (Oracle). I'm definitely in the Tom Kyte thought camp (asktom.oracle.com, tkyte.blogspot.com) of putting *data-centric* business logic in the database where it belongs, which for our applications means writing stored procedures.

Now with flex I'm starting to get excited about UIs again. But with my extensive Oracle experience I'm very intruiged about Flex's data integration capabilities. An info on this topic would be great!

Hi, I would like to know how to control the amount of data been returned from the server. In other words, I don't want to return a large amount of data to my datGrid, only when users scroll to the next page then the data will be returned accordingly.

Thank you

I've integrated the Flex samples with an installation of CF6.1 tied into IIS5 on WinXP. While it serves CFM and MXML files fine, it will not see any classes in wwwroot/WEB-INF/classes. This worked fine under CF7 during development, but I only have a license for 6.1 :/

Looking forward to the posts. I would really like to see how to use input variables with a web service that calls the variables in a query in the .cfc.

I would love hear more about installation of FDS and CF together. It won't do me a whole lot of good to read about any of the other topics until I get the installation figured out. I've been trying for over a week and can't seem to get it right. It would be great for someone to explain this process in a simplified yet detailed manner. I'm sure I'm not the only CF developer that wants to get into Flex without first learning to setup and configure J2EE servers. Thanks to anyone who can help with this.

I have a question. I have a flex application using flex messaging and the RTMP channel for communication with the integrated LCDS present with ColdFusion. Now i created multiple instances of this ColdFusion and want my flex application to work on all the instances. I was able to make this run by changing the RTMP channels of each instance and compiling the flex application seperately on each instance of ColdFusion. But the problem occurs when i update the certain record in the flex application the update is not seen on all the clients using the same application . That means the server push is not working in my case. And this will not as the application is compiled on each server instances and treat it as a standalone application. Also the RTMP channels are different for all the instances.

So how can i achieve this running a flex application on multiple instances of ColdFusion integrated with LCDS and using RTMP channel for communication?

Page Render Time:266