Zend Studio for Eclipse vs. PDT
I've used the PDT distribution of Eclipse for some time now, mostly because I got into Eclipse through Java development. PDT has always irritated me slightly because the code completion is a bit clunky and the whole system quite often grinds to a halt when it's being 'rebuilt' - i.e. everything is parsed to check if any errors arise from a change.
I recently decided to try out Zend Studio for Eclipse to see if it was any better - after all, Zend should have the resources to really provide a good PHP editor.
The first thing that struck me is that Zend Studio for Eclipse is just PDT with bells on. Have they improved the code completion? Not a lot. Zend also list some things on their site that make Zend Studio 'better' than PDT, such as the fact that a) you need to install it, and b) it has Subversiuon support.
With point a, I'm sure this is just to satisfy some licensing requirement. I actually like the fact that I can copy my PDT install from one machine to another without needing to reinstall all the plugins I'm using. With point b, there are two freely available Subversion plugins for Eclipse - Subversive and Subclipse. Zend are just bundling Subversive and claiming it enriches their commercial product.
That said, Zend Studio for Eclipse does have some very nice features, including good PHPUnit support and remote systems support (SSH shell and SFTP support built in, for example.) This prompted me to wonder - how far could I morph the freely available PDT into a fully fledged Zend Studio using freely available plugins? I might install some other useful ones on the way.
Stage 1 - a clean, up to date PDT install
The first thing to do is to get a fresh copy of PDT. I did grab the Ganymede Eclipse build and PDT2, but couldn't get Subversive to run, and I decided that this was quite important. There were a couple of other teething issues too, and I felt that I needed my custom build to be as stable as possible, so I reverted to the Europa PDT 'all in one' build as a base.
The first thing I did was visit the update sites and get all updates for Eclipse and PDT. Then I set about installing as many of the free plugins as I could find that Zend use.
Free or open source plugins
There are some key plugins we need to add or find to start to move towards the Zend build:
- Remote Systems Explorer - SSH, FTP, SFTP access
- BIRT - Reporting tools (Used by PHPUnit in Zend Studio)
- Subversive - SVN tools
- DTP - Database Tools Platform.
These can all be added from within Eclipse's own Window/Software updates screen, which is intuitive enough. The good thing about using this approach to add the software is that Eclipse will resolve dependencies for you.
Remote sytems connections work straight away (SSH, etc.), and Data Tools Platform works if you have a driver for your database. Subversive requires a separate connector plugin because the required plugins are under different licences. You can download them here: http://www.eclipse.org/subversive/downloads.php.
The driver issue for Data Tools Platform was solved by downloading the JDBC driver from MySQL. Just grab the database driver JAR and store it somewhere in your eclipse build directory. When you define the connection to your DB in the DTP perspective, you'll need to browse to this JAR file once you select MySQL as a DB type.
The next issue is unit testing. There are 2 options here. Firstly, you can install the SimpleTest plugin, or you can configure PHPUnit as an external tool. You may want to do both. It may be possible to get PHPUnit working through SimpleTest too, although this isn't guaranteed because the code isn't being maintained.
Finally, I installed Symfoclipse, which includes a Yaml editor, and Clay, which is a visual database design tool.
My version 1 ePDT build
My 'enhanced' PDT build is working nicely, and I have to thank Zend for introducing me to Subversive (I was using Subclipse before) and the Remote access tools. There are still some features that are missing from ePDT:
- Auto-generation of getter and setter accessor methods
- Integrated Zend Framework support
- Decent refactoring support (although I'm not sure I would trust Zend's for this - it works in Java because of strong language typing, but PHP is still weakly typed)
- Graphical PHPUnit support and stubbing of test cases and suites from existing code.
These features are largely borrowed from Java, and work in exactly the same way as the free Java tools do in Eclipse, which irritates me. Zend purport to be trying to promote PHP's adoption in the enterprise, but businesses don't like to pay for IDE software these days, particularly if they're using open source technologies like PHP.
Where next?
I have to say, I'm tempted to grab the Eclipse source code and see if I can build in auto getters and setters myself. There aren't too many other features that I would miss that I can't put together from the freely available plugins. All in all, a very satisfying couple of hours work!
Latest articles
- Google scores!
- Mandriva back in my top list
- The perils of package managers
- Why mix PHP and Java?
- An InputStream Iterator in Java
- Pagination in PHP or Java
- PHP and Java integration with Quercus
- Trying out Zend Studio for Eclipse
- Which framework for a new CMS?
- How to create a singleton in PHP
- A brief foray into MySQL Stored Procedures
- Sun VirtualBox vs. VMWare
- We're now a four computer household