Much ado about scripting, Linux & Eclipse: card subject to change

2007-07-22

phpeclipse vs. PDT

I've always enjoyed the phpeclipse developer experience, but I've noticed lately that the project appears to have slowed its release schedule, though they have started publishing N builds to an update site. Meanwhile, PDT, as of v1.0.0.v20070712 is IMHO, finally usable -- and also installable by update site (but don't forget to select the Europa site too in order to get all the prereqs).

I'm also impressed that PDT uses WTP's Web Standard Tools (WST), which in turn depends on EMF. So, it's a bigger install than phpeclipse, but it's full of modeling goodness, so it's worth it. Why?

With modeling comes interconnected views such as the PHP Project Outline view (a list of all defined functions (with signature), constants and classes, linked with editors), the PHP Explorer view (like the Package Explorer for Java, but unfortunately using its own set of Working Sets, rather than the shared ones available in other views), and the PHP Functions view.

However, there's a few features in phpeclipse I'll miss, such as:

  • select an include() or require() statement's argument and hit F3 to navigate into that file
  • warning of unused/undefined variables in files and functions
  • search results highlighting (other than in the right margin)

One major inconvenience I ran into, however, is that installing PDT into an existing Eclipse install with phpeclipse 1.1.9 or 1.2.0 causes a whole raft of NullPointerExceptions when attempting to open PDT editors (phpeclipse editors still work fine). I wonder if this is a namespace conflict between two "PHP Editor" editors. Anyway, removing phpeclipse and restarting seems to fix this problem, on Windows XP, anyway. I wasn't so lucky with Linux, but it never hurts to try again sometimes.

Maybe some day these two projects will be able to share resources and features instead of competing, both technically and politically. I'd love to see the great aspects of phpeclipse merged into PDT, and have those developers become committers for PDT, if they're not already. I have to agree with the comments posted on this blog about pooling resources to solve new problems instead re-solving the same ones.

7 comments:

Chris Aniszczyk (zx) said...

There's no good reason why they shouldn't be using the Outline view. Having their own PHP Outline view angers the Eclipse UI gods.

Is there a bug open against them?

Nick said...

Not that I know of, but I like to use a product for a while before I start dumping all over them with usability & Eclipse UI god bug reports. ;-)

The fact that their Working Sets don't seem to be compatible w/ the Package Explorer's is also odd. I'll open a bug eventually when it annoys me enough.

The first order of business is to get PDT to work with my linux Eclipse install first.

Chris Aniszczyk (zx) said...

done

https://bugs.eclipse.org/bugs/show_bug.cgi?id=197490

Andrew Overholt said...

I was once told that PDT required a proprietary debugger to function properly. Is that true/still true?

Nick said...

As far as I know, if you want PHP debugging in Eclipse (that is, not debugging in a console or browser), then yes, you need the Zend Debugger, which you apparently can get via Update Site. I'll be trying this out at some point and posting an update on the experience. So far it hasn't been stellar.

eric marden said...

You can use Zend's Debugger or XDebug, at least in the latest version.

Only Zend's is proprietary.

Dhruva Sagar said...

I would have to agree with you...PHPEclipse does have its advantages in some of the cases that you mentioned but they seem to be lagging behind in their development cycle...