Archive for April, 2008

Playing with Flex Builder 3

So I recently downloaded Flex Builder 3 in an effort to broaden my horizons a bit. This is really my first exposure to Flex and I must say I’m pleasantly surprised with what it can do. However, there to is a dark side to this product. I found the number of well documented examples to learn from on the weak side. Being that the core of what I do with applications is create interfaces to databases, I wanted to do the same thing with Flex. I found an abysmal number of examples on the web and those I did find all seemed to have some kind of problem or another that wouldn’t work in my environment. In the end, I got the Adobe Coldfusion/Flex Data tutorial to work but there were mixed results.

It worked great from the get go on my localhost (Windows Vista with CF8/Apache/MySQL) but trying to deploy to a test Linux server failed badly in one instance and worked great on another (the difference being the version of Linux in use). It also worked well deployed on my shared host which runs on a Windows server with CF8/IIS. There were lots of steps I had to do over and over in the project setup of Flex Builder and of course you need to ensure your Coldfusion server is set to support Flash Remoting at the least. I will likely produce a step by step tutorial as time permits but for now the working example will have to do:

http://brad.melendy.com/projects/flex/DataTest4/DataTest4.html

You can right click the application and choose VIEW SOURCE to see exactly what it takes, the primary components are DataTest4.mxml, EmployeesCRUD.as and employees.cfc. Since Flex apps must get all their data from XML, the CFC acts as a middle man between the application and the database. I hope to begin a real application at work using Flex in the next couple months and I’ll try to document any technical pitfalls or discoveries here.