November 9, 2005

Review: NuSphere PhpED 4.0

Author: Peter Lavin

NuSphere's PhpED 4 is a welcome upgrade to a Windows integrated development environment (IDE) that has been around since 2000. The "Ed" in "PhpED" stands for "enterprise developer," and this product is aimed primarily at the experienced PHP developer.

Because preferences and skill levels vary widely, developing for the Web requires a variety of tools, and what's of little consequence to one person may be an indispensable feature to someone else. For these reasons, an IDE must be easy to customize and allow for the easy integration of external programs.

The issue of customization arises immediately upon installation -- you are given the choice of installing either or both of PHP 4 and PHP 5. Both versions run within a stripped-down Web server that comes with the IDE. However, this server has limited capabilities. For instance, among other things, it doesn't support use of $_SERVER['PHP_SELF']. To get full value out of this IDE you'll want to dispense with the built-in server. PhpED can be configured to run with any external Web server. You set server configuration on a project-by-project basis, so there is no problem if you need IIS and PHP 4 for one project and Apache and PHP 5 for another.

Setting up a project is fairly straightforward. Even creating separate virtual hosts on a local server and mapping those hosts to separate projects presents no problems. You can hide specific files or types of files, and map a directory for storing documentation. PhpED comes with the open source tool phpDocumenter, but don't expect it to work with PHP 5 -- no surprise I guess, since it hasn't been updated in over a year. (It'll be too bad if this project falls by the wayside -- any volunteers to take it over?)

The folks at NuSphere are responsible for the open source NuSOAP classes used for creating SOAP clients and servers. As with earlier editions, version 4 of PhpED comes with excellent built-in support for SOAP services and the NuSOAP classes in particular. If you are using PHP 5, you'll want to use the native PHP SOAP support, but these classes are still indispensable when you're working with PHP 4.

Some people might question the necessity of a PHP debugger, but the inclusion of the commercial version of DBG is one feature of PhpED that many developers will find most attractive. Running a third-party Web server means that you'll have to configure PHP to work with the debugger, but doing so is a simple task. I installed PHP 5.1 Release Candidate (RC) 1 and didn't expect to be able to use the debugger, but every version of PHP from 4.06 through 5.1RC1 is supported. You might expect some quirky behavior using a release candidate, but none surfaced. My only complaint, and it's a minor one, is that watches are awkward to set up. I appreciated the code profiler -- this is an indispensable tool for analyzing and fine-tuning an application.

PhpED uses sidebars to show terminal windows, database clients, and PHP help files. With all this functionality you might think that PhpED is one of those unwieldy leviathans  with rows of toolbars, multiple menus, and sidebars -- the kind that produces sensory overload and seriously reduces screen real estate. Not so. The various workspaces can be hidden in sidebars and exposed on a mouseover event, leaving lots of room to see your code. If you use the database client sidebar you are still only two clicks away from viewing the structure of a table. Need to access your server via a secure shell or upload files? Again, it takes only two clicks.

There is a minor price to be paid for this sparse interface: not all of the features of PhpED are available from a menu or toolbar, including, for instance, the ability to insert code snippets. To access this feature you type the appropriate shortcut followed by Ctrl-J. You can, of course, add new files to the templates directory or change the existing ones. Also, a number of the features are context-sensitive -- running the CSS editor, for instance. You can execute Tidy on your HTML files by right-clicking the file name in the project explorer window.

For all its pluses, no IDE provides everything for everybody. For instance, I looked in vain for some way to validate dynamic pages, but there is no built-in capability to do this. However, the solution is remarkably easy if you use Firefox with the Web developer toolkit installed. Make sure Firefox is your default browser, and then change PhpED's IDE Settings to preview pages in an external browser. View your Web page and you can validate the processed page through the toolbar option Validate Local HTML. This is just one of the many customizations you may want to make. You can integrate your favorite tools and add them as menu items or keyboard shortcuts or both. For example, even though PhpED allows you to add database accounts for a variety of database types, you can't add an SQLite database. In this case, you can integrate the program by creating a menu item that points to a shortcut to SQLite.

What about the text editing capabilities -- possibly the most important aspect of any IDE? You can configure syntax highlighting and text manipulation functions as keyboard shortcuts. I particularly liked the feature that toggles syntax highlighting for HTML or PHP -- a good way to make one or the other more readable depending upon your needs. You might find the code tips and code completion features an annoyance, as I did, but you can turn them off.

If the measure of an IDE is how easily it integrates and simplifies the many disparate tasks that a Web developer must perform, then this one gets high marks. In terms familiar to Web developers, it makes everything a few clicks closer.

If you are new to PHP and intend to make serious use of it, this is a good tool to get started with and grow into. If you are an experienced developer you'll probably need something pretty impressive to change horses at this point. The bundled debugger may qualify on this count, especially if you are working with a newer version of PHP. In any case, you can make your own informed decision by first downloading the trial version. A regular license costs $299.

Peter Lavin runs a Web development firm in Toronto, Canada. He is writing a book about object-oriented PHP for No Starch Press.

Category:

  • PHP
Click Here!