Introduction and Installation
I'd read some articles and news items about Aptana Studio Pro, and after reading that it was not only a PHP IDE, but also a full-featured scripting language editor, I had to give it a look--after all, it's free to download, and I'm always looking for a better hammer for my programmer's toolbox. In this article we'll take it for a spin and let you know how it worked out!
Aptana Studio Professional, version 1.5, is free to download and use for 30 days. After that it reverts to the more basic Aptana Studio, but the Pro version is $99 for a single installation. After I use it for a while, I may just plunk down the money, because so far I am very impressed with its capabilities.
It's based on Eclipse (an Open Source IDE project), and also works as a standalone product (which is the version I selected). The installation process was pretty straight forward. After a 128MB download, I followed the dialog boxes and it was installed!
Aptana Studio requires Firefox version 1.5 or greater for JavaScript debugging, which most developers have anyway, (I didn't), so I downloaded it from a prompt that Aptana provided, installed it, and proceeded with the first trial use of the IDE.
Aptana also enabled me to automatically install some addons that allowed me to me to edit, preview and debug PHP, Ruby on Rails, Python, Server-side Ajax, Adobe Air and other developer technologies including Ajax libraries. After I selected those which I wished to work with (almost all of them), it automatically installed them with no effort on my part. Pretty slick!
It also automatically detected and added the required firewall modifications to my firewall so it could properly work, and that process was seamless as well. So far so good.
Next it allows you to add your own hosting information for uploading and downloading to and from your web host. It has built-in FTP, FTPS and SFTP support in this latest version, which is very useful. No need to use another application while you are working on a project. It also includes support for developing, viewing and debugging applications for use on S60 (mostly Nokia) mobile phones, but since I don't have any of the listed phones, I declined that option for now. Other options I declined included support for SCM plugins, including GIt, Subversive, P4WSAD and CVS (for version control support). The only other option I declined was hosting support for Cloud computing that is built into the product, as I already have my own web host and don't really intend to switch hosts just to test out this feature of the Aptana Studio (which they host).
At first glance, I was impressed that the left sidebar of the IDE provided me with links to video tutorials including an Introduction to the Studio, How to Set Up a hosted Rails Server, PHP server, Aptana RadRails Intro and an intro to Aptana PHP. As (British comedian's Sasha Cohen's character) Borat said, "very niiiice!"
Now before you say, "yeah, great, another PHP editor, just what I need", you have to recognize that it's not just a PHP editor. It's also a CSS, HTML, JavaScript, and with the above-mentioned plugins which support Ruby, Air and Subclipse and more.
I set up the FTP client to provide access to my own personal site, ReptileClan.com, and opened the main index file within the Aptana editor.
Aptana then informed me that I didn't have Ruby installed on my computer, and offered to install it for me. Okay, sure, I may as well install it, so I clicked the Install Ruby button, and finished the installation procedure. A bit strange, since the domain was just purchased last night and I only have a placeholder index page in place with one graphic and some text. Thus far, at least this time, that installation process was a bust, because there was a failure to launch the "One Click" Ruby installer. I closed all open applications (namely MSIE8 and Outlook Express) except my text editor that I was using to write this article, and Aptana, and retried, and this time it said it was downloading and installing Ruby.
Next Aptana tried to detect where the Ruby installation was, but this was not as easy as it may seem. It searched and searched, and so did I, but I wasn't able to find it myself, so I tried installing it again through Aptana. Again, no success, so in the spirit of investigation and curiousity, I went to the Ruby site and manually downloaded and installed it (which took about another 15 minutes), then clicked the Back button on Aptana and manually selected the directory where Ruby was installed. Success! Aptana then installed the core Ruby modules, which went fine, and then Ruby gems, at which point it informed me that I did not have the Ruby gems installed. Again, I installed them manually, pointed Aptana to where they were located, and it seemed to be satisfied at this point enough that I could begin to work on my main index page in the HTML editor that is built into Aptana.
Unlike previous versions, Aptana Studio Pro includes the ability to instantly preview your work in Firefox, MSIE and Safari--a much needed and requested feature that will put a smile on developer's faces. There are tabs at the bottom of the editing window that allow you to view the page you are editing in Firefox and MSIE, and to add another browser or browsers.
The only issue is that you are editing them, not by choice, in a temporary directory that Aptana creates, and it doesn't move any images you have on the page to that directory, so unless you reference a complete image URL in your source code, you get a broken image link. Once I changed it to a complete URL I was able to see the images in all their glory within the preview console. A bit of a pain, and perhaps since I'm new with Aptana, there is a more reasonable method of doing so.
There is a small link at the bottom right of the Aptana IDE that says "login", so naturally I wanted to know what I would be signing into. Creating a login/password enables developers to participate in "online services including Aptana Forums, ASAP bug database, Aptana Cloud, Aptana Studio Pro trial and Aptana Studio Pro nightly update services, all of which require user authentication." Once you log in, you can access your user profile, get alerts, and access the other services mentioned above. Not that useful thus far, but it's a nice feature to be built into an IDE!
Creating My First Project
I wanted to do some work on my new site, ReptileClan.com, so I used that as my first project. I clicked the Create a New Project button, and it allowed me to import specific JavaScript libraries for use in the project. Not knowing just exactly what each JS library's functionality was, I imported those I thought may be of use, and Aptana created the project in my Project Library. It also prompted me to select any Ruby Gems that I may wish to use, so I selected a few to start with and moved on.
I wanted to try out Aptana by doing some editing on a script I had downloaded for my site, ReptileClan.com. I choose a simple MySQL-powered blogging script called eggBlog, from EggBlog.net. The installation required me to create a new MySQL database, edit the config file, then move the files over to my web server. I was able to get it up and running without any problems, and found that it not only enabled me to set up my own blog, but it also allowed other site visitors to create their own accounts and add comments to my blogs, and it also enabled me to create discussion forums and create photo albums. Oh, and it came with several "themes" that enabled me to change the look and feel of the blog site.
Thus far, I really hadn't even needed to use Aptana except as a text editor to change the config file, but that changed when I needed to dig into the PHP script itself in order to remove a Google ad that was automatically displaying at the top of the page on every page. I located the file that was the culprit, global.php, and opened it in Aptana.
Once I located the Google ad, I simply saved a backup copy, and removed the entire <DIV> tag area and the ad was gone. By doing that, I also pulled up the content area a bit too much, so I added a couple break tags to push it back down, as shown in this screen capture:
That took care of my only issues, thus far anyway. I also edited the header image, added a snake and changed the little sign to say "Reptiles by Nature" using Jasc's Paint Shop Pro, and then I added some content to the site, including a few forum threads, some photo albums and pictures, and a couple blog entries. My new site was up and running and my work with Aptana is only getting started!
I look forward to working more with Aptana Studio, and this is one of those programs that I won't mind spending the money to add this tool to my developer's arsenal. New versions and features are coming out all the time, and the developer community is large, so I don't see it going away any time soon. Take an hour, download and install it, and give it a try--it's well worth the effort, and I believe you'll be using it for editing and developing your PHP (and other) applications going forward. The download is free, and I think you'll agree with me--and if not, let me know if you found any problems or features that I didn't mention!