Entries Tagged 'Quests/PHP IDE' ↓

PHP IDEs part 5: taking stock

OK, what’s happened since my last post? Well, I’ve been busy coding, using the Zend IDE
exclusively. It hasn’t crashed once, although javaw.exe is taking up between 65 and 120Mb of RAM which is making my computer sluggish at times.

I’ve been recommended to look at TruStudio, so I will give that a test. It’s also been pointed out that if I’m going to use the IDE a lot then limiting the price and ending up with something that doesn’t help much is not a good idea. While the thought of spending a few hundred pounds on an IDE goes against the grain (particularly when I want to get Photoshop CS2) I understand the point being made, and have therefore removed my price limit.

What’s my current testing list look like?

* Zend Studio 4.02
* “PHPEd”:http://www.nusphere.com
* “Eclipse”:http://www.eclipse.org with “Xored TruStudio”:http://www.xored.com
* “Eclipse”:http://www.eclipse.org with “PHPEclipse”:http://www.phpeclipse.de
* “Gvim”:http://www.vim.org (putting it off, but “will use these tips”:http://www.schlitt.info/applications/blog/index.php?/archives/331-Comfortable-PHP-editing-with-VIM-3.html)
* “Maguma”:http://www.maguma.com (maybe, but getting doubtful as no help from their support)
* “ActiveState Komodo”:http://www.activestate.com
* “VS.Php”:http://www.jcxsoftware.com/vs.php

One question that keeps coming up is “Can the editor be Windows-only, or does it have to be cross-platform?”. My current thinking is that Windows only is fine, because although I have enjoyed playing with a Linux desktop, I run Windows XP on my main machine and have no reason to change.

Maybe I’m going for a too heavy environment, and an editor with a debugger would do. I don’t know, it throws out a whole load of extra options to evaluate…

It’s time to take stock of my requirements again. This list is going to grow over the next few days as I think of them (I really should have written them down as they came to me while coding).

h3. Requirements

# It must offer code insight to files within PHP’s include_path (eg PEAR libraries). This saves me going online to the manual every time to check the syntax… and if the editor’s smart enough to compile a dictionary of functions/classes/methods in these files rather than rescanning the file every time, so much the better.
# I would really like debugging which can be built into the server. So when something stops working in my home-grown application framework, I can use a debugger to see what’s going on in each file, rather than adding print and print_r statements to many files.
# Code templates - so I don’t have to type every character in a foreach loop or class statement for example. Most editors provide this.

h3. Non-requirements

* CVS integration - I use “TortoiseCVS”:http://www.tortoisecvs.org and “TortoiseSVN”:http://www.tortoisesvn.org which integrate beautifully wherever the Windows file browser is used.
* Bloat. Stupid memory usage is out. Although judging by the performance of the market leader, I can’t be too picky on this.

h3. Would be nice to have

* Code folding. It does make moving around long files nicer.
* UML/refactoring. A vague requirement because I don’t really know what I’m talking about, but I’ve reached the point where I see an advantage in using UML while designing/planning.

Like most things, and however hard I try not to, I am looking for perfection. I know I’m not likely to find the perfect IDE out there ( in a perfect world I wouldn’t be using PHP ) but something that suits and speeds up my development.

Part 4: onto Zend Studio

Right, well I’ve finally got a large-ish PHP project to get to grips with. Proper PHP code to be written, and a local Linux server (”Ubuntu”:http://www.ubuntulinux.org 5.04)to test it on (that’s why it’s been quiet recently - I’ve been struggling to get the server configured. GD causes PHP to segfault, but that’s another story).

Anyway, the experience has been going from bad to worse. Because of the price of Zend Studio I’ve not been testing that, although I will use it today. However, “PHPEdit”:http://www.phpedit.net is crashing randomly, and I’ve got a reproducible crash in “Maguma”:http://www.maguma.com. (Firefox also crashed yesterday when loading my dev page, but that’s another story). The tools are getting in the way of my work!

Whatever client I use, I don’t need built-in CVS support. I’m developing on Windows, and TortoiseCVS and TortoiseSVN integrate nicely with the file browsers in the tools.

OK, the way the others are behaving I’m driven to Zend. The first thing I found was that I couldn’t open the files I wanted to from a SAMBA’d drive, as the *File System Browser* or the *File -> Open* dialogue wouldn’t navigate any of my network places. In the end I opened up Windows Explorer and dragged and dropped the file, which was fine.

On “Norbert’s”:http://norbert.mocsnik.hu/blog/ suggestion I tried mapping the share to a drive letter, which worked fine.

H4. 3.47pm

This is bad, I’m really enjoying the Zend IDE :-) Apart from the lack of code folding which I do miss, and that I haven’t figured out how to get insight into PEAR classes yet, it’s going well. There’s so much of it to learn and explore (I haven’t figured out if the PHPDoc comments can be auto-generated for example).

Certainly all the gripes about Zend Studio which Davey Shafik notes in “this post”:http://www.pixelated-dreams.com/archives/57-TruStudio-1.0RC1-Mini-Review.html are noticable, while the ones in his “mini-review of Zend studio 4.0beta”:http://www.pixelated-dreams.com/archives/60-Zend-Studio-4.0beta-Mini-Review.html I haven’t come across.

Update: reading “Norbert’s post”:http://norbert.mocsnik.hu/blog/archives/118-Zend-Development-Environment-4.0.0-beta-+-Zend-Studio-Server.html I see why code completion for PEAR isn’t working - I haven’t defined a project.

Day 3 (late)

I’ve been away over the weekend and then reading Harry Potter, so this entry got delayed…

Well I wasn’t intending to write anything today and get some programming done instead, but frustrations while programming have changed that!

First up is PHPEdit: it’s mis-identifying class variables as global variables, so the code completion when typing a class variable inside a class method gives @$foo@ not @$this->foo@. Time for another bug report methinks… especially as in the beta version this worked fine.

Maguma was exactly the same, but even worse as if I typed @$this->@ within my class it would come up with “Unable to find object definiton”.

I finally installed Zend Studio today, I know it’s fateful to install something outside my budget, but I wanted to see what its features were like. First impressions were that it was complex. Very :-)
It fared a bit better than PHPEdit and Maguma at completing class variables, but not as well as I was hoping.

I still haven’t heard anything back from Maguma support in response to my question. I’m certainly not impressed, so if anyone would like to have a go “answering my question”:http://forums.maguma.com/viewtopic.php?t=863 be my guest.

PHP IDEs: day 2

I filed two support requests yesterday, one with PHPEdit for a popup/autocomplete behaviour I thought silly, and the other with Maguma to see if it will do code insight for files in your PHP include_path.

I’ve had replies to both: A reply to my post in the Maguma forum saying it had been forwarded to a developer; and Sebastien Hordeux, the (lead?) developer of PHPEdit replied and after exchanging a couple of emails and flash-screencaptures registered it as a bug. One up to PHPEdit for a quick response (even if the others don’t have the problem in the first place)

So far I’m using PHPEdit as my default editor and have hardly touched the others, which probably means I’m biased as it feels familiar from previous use ;-)
I installed PHP Expert Editor and Rapid PHP 2005 today. PHP Expert Editor can be crossed off immediately; it doesn’t even provide code completion for class methods when the class is in the same file, let alone in an external file.

Rapid PHP 2005 is more of an editor rather than an IDE. It’s got a lot of tools to help write HTML, CSS and JavaScript. I already have “Topstyle”:http://www.regnow.com/softsell/visitor.cgi?affiliate=46464&action=site&vendor=6598 for these which I like. All in all it’s a good tool I guess for most web developers, but not for heavy PHP development. I’ve crossed it off my list as well.

I was also shocked by this PHP Snippet provided in the Rapid PHP:

bc. for (var i=1; i=max_i; i++) {

If that’s PHP then I’m a fish.

What else have I explored today?

Maguma Workbench offers a code template system like PHPEdit, but I can’t find any help on how to set it up. It also has code collapsing - a wonderful feature like collapsing folder trees but for source code which allows one to navigate and explore code much faster. I’ve had this before when using a Python editor and also once when I played with gVim and loved it.

Talking of gVim… “Ian P. Christian”:http://www.pookey.co.uk suggested I try it as well, as he uses Vim entirely for authoring PHP code (and manages without a debugger). I’ve installed it, and can see a vertical learning curve ahead!

Back on the subject of Maguma, the icons don’t seem anywhere near as overbearing as yesterday. In fact being bigger it’s easier to click on them rather than another icon by mistake.

I was stupid enough to let Maguma’s installation overwrite my php.ini - and because I had to do two installations to get the licensing thingy to work it overwrote the backup of my original php.ini. Grrrr.

PHP IDEs: Part 1

Now the summer’s come and things are slack (got work for a freelancer? “Contact me!”:peter@mapledesign.co.uk) I’m testing out PHP IDEs. I’m after something to make life that little bit easier…

I have a couple of solid criteria which any editor I use must measure up against:

# It must offer code insight to files within PHP’s include_path (eg PEAR libraries). This saves me going online to the manual every time to check the syntax… and if the editor’s smart enough to compile a dictionary of functions/classes/methods in these files rather than rescanning the file every time, so much the better.
# I would really like debugging which can be built into the server. So when something stops working in my home-grown application framework, I can use a debugger to see what’s going on in each file, rather than adding @print@ and @print_r@ statements to many files.

Another criteria for me is the cost. Zend studio is out of reach, unless some kind team member (hello Andi, hello Zeev) gives me a discount. I’m looking at a max of around £100. And if it does Python as well or other languages, so much the better.

An extensive search on Google turned up the following (a bit overdramatic, Google quickly turned up “php-editors”:http://www.php-editors.com/ which supplied most of them). The editors which I have downloaded for testing are:

* “Maguma Workbench”:http://www.maguma.com 2.5.0
* “EnginSite Editor for PHP”:http://www.enginsite.com/php-editor.htm 3.1.2 build 176
* Zend Studio 4.0.2 (out of my budget)
* “PHPEdit”:http://www.phpedit.net 1.2.3.159
* “NuSphere PHPEd”:http://www.nusphere.com 3.3.3 (again out of my budget)
* “PHP Expert Editor”:http://www.ankord.com/phpxedit.html 3.3
* “RapidPHP 2005″:http://www.blumentals.net/rapidphp/ 6.0
* “ActiveState Komodo”:http://www.activestate.com/Products/Komodo/ 3.1 (probably out of budget, but does many languages?)

Noticeable about many of the packages is the distinct lack of instructions. I’m supposed to figure out how to debug apps on the server myself? Mmmm. My intelligence isn’t *that* high :-)
Which warrants a disclaimer: some of these editors may do what I want, and it’s my stupidity which can’t figure out how to do it. You have been warned.

I am installing these editors on a 1.7GHz laptop with 640Mb RAM, running Windows XP Home edition.

I’ve been using PHPEdit for a number of years now, sticking with the last free version 0.8.0.25. While this is OK, it doesn’t fulfil 1 or 2 above. The latest version is much less flaky and satisfies point 1. I liked the speed, better than Maguma. The “New File” templates were cool, although how useful in the long run who knows.

EnginSite Editor seemed to be a real mix of PHP and HTML editing tools. It’s got a swish interface, although I really didn’t understand the painter tool which allowed you to draw boxes and join them with lines… is this a UML design tool? It has a stupid number of templates, some pre-implemented algorithms there which wouldn’t be of use most of the time. It did not seem aware of PHP’s include_path, neither could I find a way to make it. The code complete was also blank on my installation. I will have to try uninstalling and reinstalling (at some point).

Maguma Workbench, like their site, is very pretty. Whoever is their graphic designer should be congratulated. It is however a little overwhelming in the editor, even on my 15″ 1600×1200 screen the icons were huge in the default theme. The registration process was very tricky, but at the third attempt I figured out what was needed - why no instructions?

That’s all I’ve installed so far…