InfoWorld review: Eight PHP power tools

1 2 3 4 Page 2
Page 2 of 4

Eclipse's coding assistance is excellent. Aside from the basics (such as syntax highlighting), Code Assist will watch as you type and conjure a pop-up to suggest possibilities for completing a partial code element. These features apply to HTML and JavaScript, as well as PHP. Note that for JavaScript Code Assist to work, you have to enable JavaScript for your project -- a separate step that I missed the first couple of times.

As with any multilanguage IDE, Eclipse PDT's documentation can be daunting, and it only gets worse as you add plug-ins. You can't blame that on the IDE, though. On the plus side, all the documentation is available in a single, searchable interface.

While Eclipse can support both the Xdebug and Zend debuggers, the two are not compatible -- only one can be enabled for a given instance of the PHP runtime. Therefore, unless you want to be repeatedly modifying project configurations, you should pick one debugger and stick with that. We chose the Zend debugger.

The debug perspective of Eclipse PDT, showing the real-time variables view and raw HTML output.

Views in the debug perspective include a window into the PHP source file. Hover over a variable, and its current value appears in a pop-up. If the variable is an object, the pop-up will announce the parent class. A separate window shows variables in scope, and if a variable is an array or object you can open a tree into its internals. A debug output window shows the raw HTML issued by the running program.

Because PDT is Eclipse-based, you can load this IDE with more development tools than you could possibly know what to do with. While some tools may never be needed in PHP development, others could be useful. The Remote Systems Explorer plug-in, for example, provides tools for transferring files to and from remote computers, which do not have to be running the same OS as your development platform. This is particularly handy for copying files between development and deployment machines, or verifying that directory structures are properly organized on the runtime Web server.

Eclipse is probably as close to a do-it-all IDE as it gets. The growing number of spin-off IDEs that point to Eclipse as their fountainhead is a testament to Eclipse's capability. What's best about Eclipse, of course, is its vast supply of plug-ins. You can bedeck Eclipse with attachments that turn it into your one-room workshop for PHP development.

See the next PHP tool: MPSoftware's phpDesigner 7

MPSoftware's phpDesigner 7 MPSoftware's phpDesigner is only available for Windows. This limitation is understandable, given that it is the product of a one-man micro-ISV: Michael Pham, founder, owner, and engineering department for Denmark-based MPSoftware.

A fully functioning 21-day trial version is available for download from the MPSoftware Website. We tested an early release candidate of version 7 of the IDE, and it is an impressive bit of work for a one-person operation.

[ Is Perl, Python, or Ruby best? Do Java or JavaScript count? See "The best open source programming language." ]

Installation of phpDesigner is swift and easy, requiring no additional plug-ins or add-ons. Though phpDesigner is a PHP development tool, it can be used to edit source from a variety of languages, including Python, Ruby, Java, Perl, and others. The IDE offers only syntax highlighting in the additional languages. Active editing assistance (code completion) is available only for PHP, HTML/XHTML, CSS, and JavaScript.

As for phpDesigner, it's equipped with a wide range of code libraries, including the PHP Web-building framework Smarty and many popular SQL databases. The IDE also includes a built-in server equipped with Xdebug. Although phpDesigner can debug Web applications running on an external server (we used a XAMPP installation), it cannot at this time debug applications running on remote systems.

The right side of the IDE is a phalanx of code explorers. These include the Code Explorer, a hierarchical navigation window for the current PHP file, and Code Inspector, a kind of property editor for HTML code. Code Inspector displays -- and lets you modify -- attributes allowed for the HTML tag currently highlighted in the code editor. There's also File Browser, a standard browser into the local file system; FTP/SFTP, a graphical FTP/SFTP explorer; and Project, a standard Project navigation window. In addition, Templates and Snippets are two separate explorers that serve as repositories for prewritten source-code fragments and skeletons that you can drop into the source editor window to accelerate code production.

While working in phpDesigner's text editor, you can -- at any point -- request an "intelligent suggestion" by pressing the Ctrl-Space key combination. This opens a window of allowed source code clauses based on the context of the current insertion point. Code completion is also available. For example, enter an object instance, type the "->" access notation, and a window blooms open with all available methods and variables.

With phpDesigner's HTML preview feature, you can display a Web page in Firefox, Internet Explorer, Safari, or Opera (provided, of course, that the associated browser is installed) from within the IDE. Given that the same HTML might not display identically in different browsers, this is a particularly useful feature.

In addition, phpDesigner lets you check your PHP code's syntax before either running or debugging the application by clicking a "check syntax" button off the debugger menu. This checking is in addition to the as-you-type syntax checking that will catch simple errors in individual lines of code.

If you're debugging a PHP script (that is, a PHP program that runs from the command line), you can run the PHP interpreter directly from within the IDE. The only prerequisite is that you must show phpDesigner the path to the PHP configuration file. For debugging Web applications, phpDesigner plays well with XAMPP; in fact, the documentation recommends XAMPP as the easiest way to construct an Apache-PHP-MySQL development system.

phpDesigner 7 with a breakpoint set in a PHP application. The Code Explorer window helps you quickly locate instances of variables and functions in large source files.

For debugging PHP programs, whether scripts or Web applications, phpDesigner uses Xdebug. You can start debug sessions either from within the IDE or from your browser; phpDesigner boasts all the Xdebug basics -- breakpoints, watches, stepping, and so on. Unfortunately, to debug JavaScript, you must rely on an external debugger such as the Firefox-based Firebug.

Though phpDesigner has no built-in database access tools, it does provide a menu link to the popular and freely available phpMyAdmin tool for working with MySQL databases. (You must configure the IDE so that it "knows" the link to phpMyAdmin.) As an alternative, you could download a separate database manager, and many good freeware GUI-based database tools are available. Nevertheless, it would be nice to have an integrated database manager.

For project management, phpDesigner supports both CVS (Concurrent Version System) and Subversion integration.

While phpDesigner's documentation is passable, it could use some bulking up. A larger collection of how-to or tutorial entries would help a great deal. Nevertheless, we have to be impressed with the quality of this IDE, given that it is largely the fruits of one man's labors. We hope to see improvements in the future.

See the next PHP tool: NetBeans

NetBeans IDE NetBeans is a free, multilanguage IDE available from NetBeans.org. Though NetBeans began life as a Java IDE, versions exist for Python, Ruby, JavaScript, Groovy, C/C++, and PHP. The NetBeans download site offers language-specific bundles, as well as a 300MB-plus kitchen-sink version that installs everything that NetBeans has to offer.

The IDE is Java-based, and it will run on Windows, Mac OS X, Linux, and Solaris. We installed the 6.7.1 version on Windows. NetBeans downloads as a self-installing executable, and the PHP installation includes code editors for PHP, HTML, CSS, and JavaScript. NetBeans PHP is also equipped with explorers for databases and Web services, as well as interfaces into a Hudson continuous integration server and the Bugzilla and JIRA issue trackers.

[ Nine Rails IDEs are leaving the station. Which one should you ride? See "Lab test: Climb aboard Ruby on Rails." ]

The NetBeans IDE interface is a collection of dockable windows, arranged in the familiar "explorers on the left, editors to the right" format. The explorers include a typical project navigator, a file system navigator, and a database explorer. To this trio, NetBeans adds a Web services explorer.

The Web services explorer is prepopulated with nodes corresponding to services from Amazon, Facebook, Google, and other popular sites. You can drill down into a particular service to examine its offered functions and their arguments. Even better: Drag a function from the Web service explorer onto a PHP file in the source editor window, and NetBeans will write the code necessary to call that Web service function.

NetBeans source editing has all the code completion fundamentals. It will close brackets and parentheses, and it provides context-sensitive proposals for PHP language elements: Type in an object and a pop-up appears, listing known instance variables and functions. If you've provided PHPDoc-formatted documentation for the class, that information will be displayed as well.

Because NetBeans PHP includes JavaScript editing capabilities, it will recognize when you have entered embedded JavaScript in the HTML portion of a PHP source file (via the "<script... >" tag) and provide context-aware code completion of JavaScript elements.

NetBeans supports debugging on both local and remote servers. To debug on a remote system, you must first establish FTP (or SFTP) settings for the project so that source files can be transferred to the debug target. NetBeans lets you configure your projects so that files are transferred when they are saved or when the source application is executed. Remote debugging also requires you to set up path mapping so that the debugger knows which local source file corresponds to a given URL on the remote system.

For PHP debugging, NetBeans uses Xdebug. The IDE can also debug client-side JavaScript using a NetBeans-supplied JavaScript debugger. (The NetBeans JavaScript debugger is based on Firebug, an add-on to the Firefox browser.) To debug JavaScript in a PHP file, simply start a debug session, select to debug PHP and JavaScript in the ensuing window, and a Firefox window is launched with the NetBeans JavaScript debugger installed and activated.

NetBeans' HTML pallet automates the process of adding HTML elements to your source code. Drag an element from the pallet onto a source code window, and fill in the parameters in the properties window that appears, and the code is written into your program.

NeBeans' database explorer can access any JDBC-accessible database. NetBeans will automatically detect a running MySQL server at the standard port and create a MySQL server node on the database explorer tree. Right-click the node, and a pop-up opens with commands for starting or stopping the server, opening or closing a connection, running the MySQL administration tool, and so on.

Once you've opened a connection to a database, you can expand the explorer to examine views, stored procedures, and tables. Right-click on a table icon, choose View Data, and an SQL command window opens (pre-populated with a "Select *..." command that executes), displaying the data in tabular form in a separate results window. The results window also provides interactive access to database rows; you can add, delete, or modify rows without having to specify SQL commands.

All in all, NetBeans has one of the briefest startup times of any of the IDEs. Configuration is minimal; we were up and running in a remarkably short time. And debugging in NetBeans was as easy as it gets. In short, NetBeans PHP just worked -- which is just what you want.

See the next PHP tool: NuSphere PhpED

NuSphere PhpED PhpED, available from NuSphere, runs only on Windows, though NuSphere claims that you can execute the IDE on Mac or Linux using the Wine emulator. We tested the most recent version, 5.9, on a Windows XP system. PhpED comes in standard and professional versions. As you might guess, the latter has more features than the former; the Web site includes a comparison table. Special discounts are available for students, but if you want to try out PhpED, you can download a free 21-day trial version.

The PhpED IDE is equipped with tools peripheral to -- but useful in -- PHP development. These include a DB Client for database management, a Terminals window for managing Telnet or SSH connections, and a NuSOAP window for working with Web services. PhpED also provides its own embedded Web server for executing and debugging applications directly in the IDE, but the documentation states that this is suitable for small applications only. Full-blown Web applications should be debugged on an external Web server; PhpED's debugger, DBG, can work with Apache, IIS, or any Web server that executes a standard PHP runtime.

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

1 2 3 4 Page 2
Page 2 of 4
Bing’s AI chatbot came to work for me. I had to fire it.
Shop Tech Products at Amazon