PHP Development with Linux

Tuesday 25th March, 2008 at 11:55 pm

Linux PenguinI switched over to Linux at work recently, mostly due to our servers running on Linux and the opportunity of directly interfacing with the servers made my job a hell of a lot easier. No longer being able to use my trusty Macromedia Dreamweaver to do my work, I had to try out a couple of different PHP development solutions until I found the one that was right for me and could keep up with me.

And the winner is… VIM.

After playing around with software which promised the world, some which didn’t deliver, I grew to like the hidden simplicity of VIM. The development team leader at my work urged me to work with VIM, as it was the most simple and yet most powerful system to develop PHP with, and after so many functional but flawed pieces of PHP software, I’m inclined to agree with him. Here’s a couple of different PHP development solutions I tested in my search for a PHP editor and the pros and cons of each that I found. It should be noted that in each time, I fell back to VIM to complete my work when the PHP software was fighting with me to keep me from doing my work.

Quanta Plus

Quanta Plus is KDE’s answer to the web development industry. It covered nearly all the web-based programming language out there, including ASP, PHP and Ruby, it had coloured syntax highlighting, project management, a visual-based editor, code completion and a whole bunch of other useful features. So what was so wrong about it? I initially welcomed the project management, specifically how it could manage a remote site using FTP, like Dreamweaver, except it went one above Dreamweaver and didn’t keep a local copy, instead preferring to manage things remotely. I thought, oh yeah, this could prove to be useful. Alas, I was wrong.

We use an in-house CMS solution called BamCMS at my work, and generally a fresh copy of a CMS site, without any modification, is around 100-200 files, made up of templates, JavaScript, core-linking scripts and the like. Quanta absolutely shat itself trying to create a project based on a site that big. It refused to recognize any files, just because of the sheer amount of them. I was forced to create a fresh project which would sit inside the FTP directory it would interact with, but not register any files, instead, I had to manually include the files every time I wanted to add them. This easily become tedious and cumbersome. I decided to give Quanta+’s SVN support a go. No show. It would not read our Subversion and I was forced to use FTP. Quanta+ also stores the project details remotely in the FTP. I can understand the reason. A person could install Quanta on 2 or more computers and be able to edit the site for any one of those computers, but the files appear everywhere, and become annoyingly hard to clean out. Quanta+ also insists on having a ‘templates’ folder and a ‘toolbars’ folder in the home directory. Templates was not an issue for us, we do store our templates in a folder called ‘templates’. But I had around 10 or so projects which had a useless ‘toolbars’ folder.

I used this program for 1 month before giving up and giving it the flick.

Screem XHTML Editor

I was attracted to this software for what looked to be a simple yet feature-rich software package. Whilst built as an XHTML editor, it did have support for PHP syntax-highlighting, which is all I needed. It also had support for publishing websites to an FTP or SVN. I tried this, and once again, neither worked as expected. The software was very buggy, constantly crashing, refusing to close. I had to get rid of it after 2 days of installing it as I couldn’t handle the crashes.

Zend Studio for Eclipse

You would think that software designed by the very developers of PHP would be the virtual messiah of the PHP IDE world, like Moses parting away the wave of uninspired, tardy shovelware and creating a path to this software. Instead, I found the software to be the ‘jack of all trades’ and by very definition, the ‘master of none’. This program is so feature-rich it was a surprise then, for me, to find the program doesn’t do what it is actually built for very well, the main reason people buy it, and that is to code PHP.

Let’s get the good stuff out of the way first. The Subversion support for this program is fantastic. This program is really designed to encourage team-based development, using Subversion (CVS is supported as well) as the catalyst to spark checking-in and out of work, developing using versions and getting a real organised structure going. It is therefore very surprising to me to find the FTP support of the program is quite sub-standard. You can import and export using FTP, but there is no way to tell Zend Studio to import and export your project to FTP automatically, instead favouring you to work with Subversion instead. Unfortunately, due to the way our development servers are setup, working directly on Subversion was not a good idea, and required us to manually update the development versions of our site if we added our changes straight to Subversion. Yes, it isn’t the most optimal way of coding, but it’s the only way in my case, and it’s not a far stretch to ask for some decent FTP support.

The program also had a database manager, the first program I had found which did contain one, so I was quite eager to give that a try. Instead, I found it counter-intuitive and very un-usable. I resorted to using phpMyAdmin, and indeed made me appreciate phpMyAdmin on a whole new level. Once again, I felt that Zend Studio tried to cover everything, and instead of being the only solution for a PHP developer, just broke my task of developing into even more sections.

The main feature, the PHP coding area, whilst using official (or at least default) PHP code colouring highlighting, insist of giving you these mutha-farking big tooltips every time you type a function. For obscure functions I had never used before, this was great, it saved me the trip to php.net to find out the syntax. For echo statement, hardly useful and surprisingly intrusive. These things are so big they literally covered half of my code with helpful nonsense. I am sure someone will point out to me that I could disable them, but I found the options area to be teeming to the brink with options, and for a first time user, it was quite confronting. I eventually found the setting, but by then, I found the program to be victim of too much functionality. Dreamweaver didn’t have SVN support, database interfacing, tooltips the size of a house and all that. But it did what it was designed for bloody well. That has to count for something.

In closing

If your a PHP developer, and you use Linux, just use VIM for PHP developing. With code colouring enabled, it is simply the easiest option to program PHP.


Related Posts

2 Responses to “PHP Development with Linux”

  1. fhisch reckons:

    I’ve been using Eclipse for a while, and recently switched to Zend for Eclipse. When I first started using Eclipse, the hardest part for me to get used to was the workflow, though now it feels a lot more natural and even sensible. I agree that Zend for Eclipse has its flaws, but after all the research my fellow devs and I did it has proven to be the overall best tool for a team of devs.

    I’d like to point out that direct FTP editing can, in fact, be done. In the PHP perspective, there should - by default - be a Remote Systems tab next to a PHP Projects tab. Remote Systems is essentially the local/ftp file browser. After adding an ftp as a remote system, you can either browse to a file and open it directly, or do what I usually do - right-click the httpdocs directory and create a remote project. One thing I’d like to be able to do, (and am not sure if the Eclipse workflow currently allows for), is have a remote project for direct ftp editing AND have the same project checked in to the SVN.

    The code assist features certainly have room for improvement, but they do their job at least as well as they need to. They help significantly with debugging, and I usually don’t have to search through the php documentation if I can’t remember the exact name of a function I need, or the order in which it takes parameters, etc. The same goes for my own functions or classes defined in an included file.

    I still use VIM from time to time, but mostly for minor edits. The ability to perform regex search/replace has also proven helpful at times.

    For complicated projects, it seems to me that an IDE such as Zend for Eclipse (or even simply Eclipse with the PDT plugin) is a must.

  2. Ben Thomson reckons:

    Congratulations on being the first comment on my blog, fhisch. (apart from all the spam comments I have to delete every day). May you wear that badge with honor when this blog, admittedly unlikely, ever becomes popular.

    I do believe Zend Studio for Eclipse was built mainly towards team development. As I stated, the Subversion support is fantastic, and really encourages that team collaboration. However, I know that for the freelancer, or a small business, they use Subversion only for version control, not collaboration and instead use FTP to upload and edit files.

    I did find out eventually how to do FTP, but it was neither obvious, nor streamlined for ease of use, which I think is a terrible choice considering nearly every other IDE out there does FTP properly. I should probably mention since this article was written, I have discovered the Aptana Plugin for Eclipse, which brings across Aptana’s FTP support, and their FTP system is fantastic. When setup properly, it is just as intiutive as Dreamweaver. However, it doesn’t discount the fact that Zend Studio should’ve had the proper support in the first place.

Leave a Reply