Welcome to bpurcell.org, the personal homepage of Brandon Purcell. I started building bpurcell.org many, many years ago to share information I ran across everyday in my role as a Support Engineer and Consultant for Macromedia/Adobe. As a support engineer and consultant I always had a lot to blog about but as I moved into managment roles at Adobe my technical content dwindled.
I currently work as the Director of Technology for Universal Mind. My primary responsiblity is managing the SpatialKey project and it has been an amazing experience. I have been spending a lot of time working with Amazon Ec2 and will share my experiences through the blog in the future. I truly believe that Cloud Computing is the IT platform of the future and we have built the SpatialKey architecture on top of Ec2.
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.
- Deployment options - seperate instances, single instance (deployed as a singe web app, deployed as a seperate web app)
- External Webserver configuration options (IIS & Apache)
- Data integration (HTTPService - XML, Webservices, RemoteObject (examples and gotchas)
- 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.
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.
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?