Review: Eight PHP power tools

Eclipse PDT, NetBeans, NuSphere PhpED, and Zend Studio lead a capable field of IDEs for Web developers.

Though precise statistics are difficult to obtain, PHP is undeniably a top choice as a Website building language. Since October 2009, the TIOBE Programming Community Index has PHP holding third place -- behind Java and C -- among programming languages overall. Regardless of the exact extent of PHP's usage, you need only consider that Web sites such as Facebook -- which manages millions of users and petabytes of content -- use PHP; workloads of that magnitude demand a serious programming language and supporting environment.

You can't build a world-class Website without a good development environment. In the case of PHP, the development environment must be particularly capable; a PHP programmer will rarely be programming only in PHP. PHP is necessarily entwined with HTML and JavaScript on the front end and with SQL on the back end. Consequently, a good PHP IDE must allow the developer to work with equal ease in multiple languages (both programming and markup) and contexts.

[ Debugging a mixture of HTML, CSS, JavaScript, PHP, and SQL requires the right tools. See "Debugging PHP Web apps is hard to do." ]

In this article, we examine eight IDEs: ActiveState's Komodo IDE, CodeLobster PHP Edition, Eclipse PHP Development Tools (PDT), MPSoftware's phpDesigner, NetBeans IDE for PHP, NuSphere's PhpED, WaterProof's PHPEdit, and Zend Studio. All of these PHP toolkits offer strong support for the other languages and environments (HTML, CSS, JavaScript, SQL database) that a PHP developer encounters. The key differences we discovered were in the tools they provide (HTML inspector, SQL management system) for various tasks, the quality of their documentation, and general ease-of-use.

In our estimation, four of these IDEs rise to the top. Zend Studio is an excellent PHP IDE once you become familiar with the Eclipse landscape. NuSphere's PhpED is also first rate and deserves your consideration if you need a professional-quality IDE and support. If you're on a budget or you can make it without technical support, Eclipse PDT and NetBeans are exceptional tools.

[ Don't see the scorecards, screen images, or table? Read the original article at InfoWorld.com. ]

As always, development tool choice is heavily influenced by personal idiosyncrasies. For example, we know good developers who love Eclipse, and we know good developers who despise it. All the IDEs in this roundup are either free or available for a reasonable trial period. Use our commentary as a guide, but you owe it to yourself to spend some time with each IDE that appears to have the proper mixture of features needed on your PHP project.

See the first PHP tool: ActiveState Komodo

ActiveState Komodo ActiveState's Komodo is not only a PHP IDE, but a multilanguage development environment that can also handle Perl, Ruby, Python, Tcl, and others. In addition, Komodo is OS agnostic; it can run on Windows, Mac OS X, and Linux. Licensing is by user, so a single license allows you to execute the IDE on multiple platforms. We tested the Windows version of Komodo 5.2. You can download a 21-day trial edition from the ActiveState Website.

Komodo installs with support for both the Smarty and Zend PHP frameworks, as well as integration with a number of version control systems (CVS, Subversion, and Perforce) and the distributed versioning systems Mercurial, Bazaar, and Git. It also provides shells for those scriptable languages it supports (and that you have installed). We had Python installed, so we could open a Python shell and hand-execute Python code. Because PHP now has a command-line interface, we had hoped to find a shell for it. We were disappointed -- perhaps in a future release?

[ JavaScript, Perl, PHP, Python, Ruby on Rails... Where should programmers place their bets? See "Dynamic programming futures." ]

The Komodo UI is built on the Mozilla codebase. As a result, the IDE acquires the exceptional plug-in architecture that Firefox enjoys; developers can extend Komodo's capabilities in the same way that Firefox users can extend its features via Firefox .xpi files. Currently, there are more than 50 plug-ins available from the ActiveState Website. In addition, the IDE supports a macro recorder. Turn the recorder on, issue a series of menu selections or keyboard inputs, and stop the recorder -- a macro is created that you can save for later use.

Some redundancies in the Komodo user interface are mildly distracting. For example, if you want to create a PHPUnit test plan, you can do that either from the Tools | Test menu or the Project | Test menu. We're all for flexible user interfaces, but when you see the same selection in two places, you wonder if there is a subtle difference between the choices.

Komodo's code completion works for all the languages you'll deal with in PHP development. Not only does it provide assistance for PHP elements, but for HTML and JavaScript (including embedded JavaScript) as well.

Komodo's debugger configuration wizard helps you get a debugging session started quickly. You can enable the CGI Environment Simulation setting for your project, which creates a sort of Web server holodeck that fools the application into thinking it's running in a real Web server. You can configure the environment variables and PHP super global variables to make the application see whatever illusory external world you wish. Setting up the CGI Environment Simulation is quick and easy, but there are times when you need to debug the application on an external Web server; Komodo supports that as well.

The Komodo IDE is shown here single-stepping through a debugging session. At the bottom, the output window shows the raw HTML generated so far; the Locals window shows the content of in-scope variables.

Debugging JavaScript in Komodo requires that you install a Firefox plug-in. Luckily, the plug-in installation is automated through a Preferences window selection. While it's possible to debug an application's PHP personality at the same time you're debugging its JavaScript personality, you have to run "multisession" debugging. This amounts to connecting a PHP debugging session in one window and a JavaScript debugging session in another window to the same applications. It's a bit involved; fortunately, the documentation gives a good discussion of the setup and execution.

Komodo has no built-in database management system. You'll have to find a separate tool for that. It does provide an HTML inspector, which installs as a browser proxy. Not only does the Inspector track HTTP request/response transactions, but you can use it as a kind of debugger. You can define actions to be performed if a specified condition is met -- for example, if the content of a request includes a particular string. Available actions include delaying the transaction by a specified amount of time, manually altering part of the transaction (either the request or response) before passing it along, deleting a portion of the request or response, and so on.

Komodo is a capable IDE that's easy to install and work with. The CGI Simulated Environment is a nice feature, but while local debugging is a snap, debugging a remote application can be tedious to set up. Though we would have wished for an integrated database management system, Komodo is nevertheless an excellent choice if your development requirements go beyond PHP and into one of the other languages supported.

See the next PHP tool: CodeLobster

CodeLobster The CodeLobster PHP Edition IDE, available from CodeLobster Software, is perhaps the best-named product in this roundup. Registration for the IDE is free, but its half-dozen plug-ins are not. Each plug-in has a different trial period, ranging from one week to 30 days. The plug-ins provide support for the open source Drupal CMS, the JQuery JavaScript library, Joomla, the Smarty PHP framework, WordPress, and the PHP Web application framework CodeIgniter.

These plug-ins primarily assist in the editor's code completion functions, although the Drupal plug-in gives you a wizard for creating a Drupal Website project. The wizard leads you through a series of query screens -- which version of Drupal, database connection information, theme, and so on -- and builds a skeleton that helps get your Drupal project off the ground.

[ The iPhone wins, and developers lose? See "Software development's winners and losers, 2009 edition." ]

A new user to CodeLobster will instantly notice something missing: a help system. There is "context help," but this appears to work only with code elements. For example, hover over the PHP function mysql_num_rows(), press the F1 key to activate context help, and the online PHP documentation for that function opens in your browser. For real documentation, you have to go spelunking on the CodeLobster Website.

CodeLobster is able to install its debugger automatically, but it needs considerable hand-holding in the process. And here's where the missing help system really hurts. To figure out how to configure your installation for debugging, you have to crawl through the features list on CodeLobster's Web page. There you will learn that you have to fill in a series of parameters in the Preferences window -- including the location of the PHP executable on your machine, where your Web server's virtual folder is, your Web server's host URL, and so on. We found the clearest explanation of the configuration process in the Web site's forums. It took us several attempts to finally get the debugger working.

Even then, we were unable to get the debugger to start at the proper file. There is a Debug URL selection on the Debug menu, which lets you choose the start URL. Though clumsy, that got us the function we needed; nevertheless, it would have been nice had we been able to deduce how to launch the debugger on a specific start file in our project.

At first glance, CodeLobster appears to provide an SQL management system for MySQL. You define a connection to a MySQL database and CodeLobster will open an explorer into the tables of that database. The explorer lets you drill down into the table's columns and their data type definitions -- but you cannot otherwise manipulate that database.

CodeLobster's "dynamic help" system is actually a sort of search engine. Here it finds the prototype for a PHP database function, and also provides a link to the online documentation.

It turns out that the SQL connection serves only to provide CodeLobster with information for SQL auto-completion. Whichever SQL database you have opened in the CodeLobster explorer will be used by the source editor to guide SQL auto-completion. Certainly, this capability is welcome, and CodeLobster is extremely good about deducing when you're entering an SQL statement in a string. We would have been happier, however, if CodeLobster had extended the database explorer to a management UI.

CodeLobster's auto-completion is its finest feature, because it is always on hand to suggest upcoming words or phrases. It actually works like a search engine -- which, though powerful, can sometimes be confusing. If you begin to enter "Select," it will suggest PHP, JavaScript, and SQL instances associated with that word.

CodeLobster is free, but so are two other IDEs in this roundup, which puts CodeLobster against some stiff competition. The lack of an in-the-IDE help system is extremely difficult to bear, especially for users new CodeLobster.

See the next PHP tool: Eclipse PDT

Eclipse PDT There are numerous IDEs based on Eclipse, and countless programming language projects have been crafted in Eclipse IDEs. For PHP development, the Eclipse PDT (PHP Development Tools) project is the place to visit.

Eclipse PDT was developed jointly by IBM and Zend, though contributors come from beyond those two organizations. Recently, Aptana (whose Aptana Studio supports PHP) has begun substantial contributions to the PDT project.

Eclipse PDT is available for Windows, Linux, and Mac OS X. Windows and Mac OS X versions can be had in 32-bit or 64-bit variants. At the time of this writing, the latest release was version 2.1.2.

We tested the Windows version of PDT, an "all in one" installation that bundles every plug-in you need for PHP development and then some. This includes the Data Tools Platform for managing databases, as well as plug-ins for JavaScript development, Web development tools, XML editors, and more. Eclipse PDT also includes the Zend debugger, though you can use Xdebug as well. Of course, if the pre-installed features aren't enough, you can install any useful plug-in from the vast spectrum of Eclipse development tools.

[ Eclipse is a winner of InfoWorld's 2010 Technology of the Year Award, which recognizes the year's best hardware and software. Take a slideshow tour of all 20 winners. ]

The Eclipse paradigm consists of the related concepts of perspective and view. In its simplest form, a view is an editor into work space information (a PHP code editor is a kind of view). A perspective is a collection of views organized toward some purpose, so you open the PHP perspective to edit the files in your PHP project. When it's time to debug your application, you open a debug perspective.

1 2 3 4 Page
Infographic: Starting salaries for computer science grads
View Comments
You Might Like
Join the discussion
Be the first to comment on this article. Our Commenting Policies