ONLamp.com
oreilly.comSafari Books Online.Conferences.

advertisement


NuSphere's IDE for PHP Programmers

by Jay Greenspan
11/28/2001

Editor's Note -- This review of PHPEd takes a look at NuSphere's Integrated Developement Environment (IDE) for PHP programmers that features a text editor, code debugger, and time-saving wizards for creating HTML and JavaScript.

PHP developers are generally a passionate bunch. They have strong feelings about their favorite language for Web applications development and the comparative failings of other approaches. These emotions usually extend to a specific development tool -- a text editor. Whether it's emacs, vim, HomeSite, TextEdit, or BBedit, most PHP coders have their favorite tool that they swear by.

I know that for me, however, this geeky love fest can turn ugly when it comes time to debug PHP code. Text editors, no matter how well they're designed, are not equipped to help you track down a misspelled variable name, a misplaced argument, or a malfunctioning function. I don't think anyone enjoys the process of sprinkling PHP code with echo and print_r statements and re-loading pages over and over.

My guess is that some developers who might have chosen PHP because of its power and ease of use went with other languages because PHP lacked an IDE. This need no longer be the case, as no fewer than three companies produce IDEs for PHP (Zend, ActiveState, and NuSphere). This article will give an overview of one of these products: NuSphere's PHPEd.

PHPEd, like all IDEs, is designed to do lot more than any text editor. If an IDE works well, it should cut your development time. So while the transition from some beloved text editor to an IDE might be difficult as you pine for your old macros and shortcuts, in the end it should be worth the time you invest getting to know the new tool.

Using PHPEd, your major time savings will come when debugging code, but since you will spend much of your time typing PHP, I'll start by looking at PHPEd's text editor. Note that PHPEd is currently a Windows-only tool. However, the word is that a Linux version should be released soon. If you're working on another OS, look into one of the other IDEs.

PHPEd's text editor

You'll find that PHPEd competently performs all of the tasks expected of a text editor: its syntax highlighting is fine, and it automatically inserts closing quotes, parentheses, brackets, and curly braces. Figure 1 shows what some syntax-highlighted code looks like in PHPEd. Note that the colors are configurable, which was good for me, because I did not find the default colors aesthetically pleasing.

Screen shot.
Figure 1.

As you type function names in PHPEd, the text editor displays a function reference, complete with return value and arguments, as shown in Figure 2. If you're currently using a basic text editor for PHP, you might find that this simple feature saves a lot of time, as you don't have to pull open a page from the PHP manual every time you forget the order of arguments in a function.

Screen shot.
Figure 2.

Similarly, when you type a dollar sign ($), PHPEd automatically displays a window that lists all of the variables that have previously been defined in the active script. At this point, the listing is a bit too extensive, as variables that have been deleted continue to appear in the listing.

Screen shot.
Figure 3.

Like most text editors used by Web developers, PHPEd has features that ease the tedious process of creating HTML and JavaScript. There are wizards to create HTML forms and tables, so you don't have to hand code every tag and attribute. A Document Object Model (DOM) reference will help developers navigate through the lengthy object property and method names used in JavaScript. These HTML and JavaScript features are not as advanced as those found in HomeSite or BBedit, but that shouldn't be too surprising, as this is primarily a PHP tool.

Screen shot.
Figure 4.

Pages: 1, 2

Next Pagearrow





Sponsored by: