Don’t call me DOM

6 July 2007

A bright eclipse

Filed under:

Most of the Web development I work on is, for good or for worse, using PHP – my natural preference would go to coding in Python, but PHP is what was and is available on the W3C servers, and I’ve become much more fluent in it than in any other programming language.

One of the most annoying things to me with PHP (at least with PHP4, I haven’t really worked with PHP5 yet) is how clumsy the object model is and how lame the API appears: after more than 7 years of continuous development in PHP, I still have difficulties remembering the name of very classical functions, or when I do, I can’t remember the order of the arguments – the functions dedicated to arrays are a typical example of these, probably because they didn’t have a well-known C ancestor, and thus were likely designed on the fly by the early PHP creators.

Also, I have only recently started to use phpDocumentor, a rather powerful package that allows to create nice documentation for PHP projects, to the (unavoidable) cost of following the classical JavaDoc documentation style. But once this documentation gets created, I felt really disappointed that the effort put in it couldn’t be used directly while developing without having to navigate through it in my browser.

The obvious answer to these problems is to use an IDE, but the past few times I had been looking, I didn’t find anything very exciting for PHP development on linux, and thus have been using Emacs with mod_php for many years.

But my last investigation of the topic, motivated by a few attempts to code in Java for the mobileOK checker new generation, was the good one: the oh-so well-known Eclipse IDE has a “PHP perspective” (in Eclipse jargon, a module to handle PHP development) that just reached version 1.0: PDT, standing for PHP Development Tools.

I first tried to get it to run on the version of Eclipse provided with Ubuntu, but quickly ran into dependencies hell – but given that this attempt just followed the release of a new version of both Eclipse and PDT, I can’t say, retrospectively that I am too surprised. So I eventually opted for the all in one package made available, and have been happily experimenting with it for the past few days.

My general impression is extremely good; I don’t have to think anymore to remember my function names or my classes definitions, syntax errors are highlighted in a much more reliable fashion than they ever were in Emacs, and the tools to navigate through the code or create documentation are really practical and useful.

I still have to figure how to get better keyboard navigation – I still have to use the mouse to do e.g. CVS operations, which could be a back-to-zero problem shouldn’t I find the proper way to configure this. The thing is, there is one commonality between Eclipse and Emacs, they are full-blown operating systems in the guide of editors or IDE…

2 Responses to “A bright eclipse”

  1. Hugo Says:

    PHP5 has much better object-oriented capabilities. BTW, PHP4 was released in 2000, and PHP5 in 2004: it’s time to step into the 21st century. ;-)

  2. dom Says:

    Tell me about it! We’re already catching up with Apache 2, have caught up with Mysql 5, but we’re note quite ready to migrate to php5… PHP5 certainly looks nicer, but I fear we won’t be there before some long long time (probably just in time for php6).

Picture of Dominique Hazael-MassieuxDominique Hazaël-Massieux ( is part of the World Wide Web Consortium (W3C) Staff; his interests cover a number of Web technologies, as well as the usage of open source software in a distributed work environment.