Mark Clemons

Diving into Flash Builder 4

by admin on Jul.22, 2009, under Uncategorized

flash-builder-logo I took the plunge and started working with Flex 3 instead of flash but immediately found that it too was outdated and went and got Flash Builder 4 beta (formerly Flex 4).

I’ve been lucky enough to work with my good friend and compatriot Dr. Jonathan Kaye     on a project which will be using a plethora of technologies. Apache, PHP, MySQL and Flash Builder to name a few. I’ll probably also get back into designing so Photoshop will make it into the mix at some point but that’s for another day.

Today though I would like to talk about the process of setting up a data service in Flex and retrieving my first bit of data from the database. In order to do this I needed a test server so I dug out an old windows XP disc and made myself a virtual hard drive to setup the web server on.  After that I went back to what I used in the past for test servers and grabbed phpTriad. Triad is one of the original software packs that bundled Apache, PHP and MySQL together into one easy to use installation. Unfortunately they stopped updating it a couple of years ago so the technology was way old, but trusting that Google would deliver the latest I just went ahead and downloaded without looking…

Unfortunately the version of PHP was to old for Flash Builder to work with. Now I’m no network admin but I thought it should be easy enough to update to PHP 5.3.0  myself, no dice… So I uninstalled everything a went looking for a replacement for triad and found the friends of Apache and XAMMP Super easy to install and worked like a charm.

Next I wanted to give outside access to this virtual drive sitting on my computer to Jonathan so I downloaded Hamachi, which is a great free solution for virtual networks. With that installed and RPC opened up you could now have total control of this box remotely.

I made a quick database for the proejct and created a couple tables and put in some sample data. Progress! Now I have something to pull out of the database and see in my Flash App. At this point I turned to a few blog posts, first this one by the morphic group, and then another one by Mihai Corlan. Using both of these I was able to create the PHP classes necessaisary to access the database and then the action script classes to introspect the data from php and deliver it to a data grid in Flash Buidler.

Learning the Hard Way

One of the most valuable pieces of information I can give is that when reading these tutorials or any tutorial for that matter, if it is a step by step procedure make sure you read a few steps ahead before you do the current step. Why you ask? Zend frame work that’s why, I read ‘you’ll need the Zend framework and AMF’ and before reading more then that off I went downloading those two things, if I had simply read a little more I would have realized that when constructing a PHP data connection service in Flash Builder that it automatically installs Zend and AMF for you! So precious time was wasted downloading, unpacking, installing and reading about those two things.

I find it frustrating that a lot of times learning new technologies, whether it’s Flash Builder, C#, Silverlight or even PHP for that matter, you have to become a network admin, configuring and setting up servers and software often with confusing or poorly written documentation before actually getting to the piece you are trying to learn. Some may view that as part of the learning process but I view it as ancillary to the real task at hand.

Like Randy Drisgill said to me, and what some of you may be thinking, why not just use a premade VHD they make life so much easier, well in the case of learning Flash Builder, I really didn’t have that option, I spent a few minutes searching but couldn’t find anything immediately that would help me plus, there are still customizations you have to do to them in most cases.

The good news is that the Flash Builder UI, the components and controls that are included are all very easy to use. There is a plethora of information out there available to learn Flash Builder and I applaud Adobe for delivering alot of that documentation.

Hopefully I’ll be able to post some screen shots and links to our project soon enough.


1 Comment for this entry

  • MishaPowerauto

    Your blog was of course amazing again even though it was terrifying for me to read what happened to you.You turned what could have been a very bad thing into something funny and positive. Do take care. Also your live radio news broadcast was also amazing.I love you xoxox
    http://www.mclemons.com – cool!!!!

334 Trackbacks / Pingbacks for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...