I’m currently developing an AIR application with my good friend Rich. Obviously we’re using Flex for the UI and client-side logic. On the back-end we’re going to use AMFPHP (a personal favourite of mine). In the past I’ve used Dreamweaver, PHPEclipse and more recently Aptana for PHP development and some of these are more suited to a Flex workflow if your main Flex IDE is Flex Builder (or eclipse).
The only issue I had to begin with was the previewing of PHP via Aptana with an external web server (in my case MAMP). This is compounded even more if you are using the domain aliasing feature of MAMP Pro. The solution is pretty obvious but can be a bit confusing as the Aptana documents that relate to Preview set up appear to be a little out of date.
The first thing to realise is that the traditional Run option in eclipse doesn’t have anything to do in this case (I’m still working on getting this working with MAMP Pro too). Previewing PHP with Aptana involves enabling the HTML preview functionality of Aptana’s PHP editor – It’s a nested tab affair but works pretty well. You can see what it looks like in the image to the right. You’re not restricted to a single preview tab either. You can enable additional tabs based on what browsers you have installed (although at this point it seems to be just SAfari and Firefox on OS X).
The key thing to be aware of is that if you are using MAMP Pro local aliases you can’t use the XAMPP server setup dialog to test your code, as the basic MAMP scripts don’t control the aliasing (they will resolve to ‘localhost’ by default). You’ll need to create a set of custom shell scripts to achieve this. The good news is, that you don’t need to worry about this for previewing your code.
To enable this you need to either set it globally in your eclipse / Aptana preferences or on a per project basis. I opted for the latter as I use aliased domains to develop against so they are generally specific to the project. Below are the steps for setting up previewing on a specific project in case you’re not too sure what to do.

Npw this one is here purely for those new to MAMP Pro as most established users will already know how to do this. Plus it’s pretty simple to do so you should fly through this bit.
The preview feature isn’t restricted to PHP projects. I believe it will work with any project that can display HTML (so AJAX, RoR etc, but I haven’t tested any of these so I may be wrong)
Currently (Aptana build 1.1x), if you change the project document root as shown at the top of the Aptana HTML Preview settings dialog to something other than “/”, Aptana will ignore it. This is scheduled to be resolved in Aptana build 1.2, but just so you are aware this may cause issues if you have your PHP project set up with a ’src’ folder (or something of a similar nature) as the root.
This work is published under a CC-GNU LGPL.
It’s not clear how to set up a proper project – like in Eclipse – which contains all the files in your web. We are working on the website for our hotel in Prague and are trying to find a JS debugger which works well with Coldfusion.
Hi Jane, if you aren’t already using Aptana; then I would suggest you go and download the community edition from their site – http://www.aptana.com. Once you have that installed (either as a stand alone application or as a plugin for an already established Eclipse development environment), you can review the Aptana help documents on how to go about setting up your web projects.
However if you are developing your back end in Coldfusion I would suggest using CFEclipse (http://www.cfeclipse.org/) and perhaps JSEclipse (http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email), unfortunately JSEclipse is only available as an optional plugin for Flex Builder.