Web Development IDE

By | April 29, 2009

I’ve been setting up my development environment for building PHP based web applications. Since I’m an Eclipse geek I decided to try out the Aptana suite. I thought I’d jot down a few thoughts.

The installation of Aptana is through the Eclipse update manager. Simple stuff. After you reload the IDE you’re presented with the Aptana home page. From here you can install the extra plugin for PHP (or others). More clicks. Simple again.

What I like: the code tab has a set of preview tabs next to it. You can load up your page in any of your installed browsers and check that it works. This is awesome for checking cross-browser compatibility. The debugging of PHP is excellent. Being able to step through as the page renders makes bug tracking so much simpler.

My Aptana experience has not been all plain sailing. For some reason my call to mysql_connect would only work if I pass in params for dbuser, dbpasswd etc. AND had to repeat them in the php.ini file (you edit this under the Aptana section in the workspace preferences dialog). I’m still not sure why this is happening but it works for now.

gd (graphics manipulation) support didn’t work out the box. The default install of Aptana included a gd.so file but Eclipse told me that it was missing libpng.so (go into window -> prefs -> Aptana -> PHP Interpreters and Edit then click verify). I copied the gd.so file from my Ubuntu PHP install into the ext dir for the Aptana CGI PHP interpreter [.eclipse/org.eclipse.sdk.ide/updates/eclipse/plugins/com.aptana.ide.php.interpreters.linux.x86_5.3.16.v20081209/resources/php5/ext/], overwriting the default, and that fixed it.

My latest weirdness was that the internal Jaxer HTTP server wouldn’t serve out new/uploaded files. The fix for this is to refresh the workspace view in Eclipse. Jaxer must use the Eclipse workspace config file to decide what it will serve out as web pages.

If you are interested in more then the screencast intro to PHP is a good starting point. Next I’m going too try out PHPUnit with Eclipse and Aptana.