InfoWorld review: Eight PHP power tools

1 2 3 4 Page 3
Page 3 of 4

When you first launch PhpED, it executes a series of tests to verify that its various components are executing properly. For example, it checks that the DBG listener extension is running, locates the current version of PHP, verifies that it is associated with the .php extension, and finds the php.ini configurations file and the extensions directory. It will also ensure that a debug session will execute properly; it does this by issuing single-step and breakpoint operations to the debugger and verifying that they are acknowledged. This is a bit of a godsend, as you can expend a lot of time just configuring a development system.

PhpED has all the expected code assistance features for PHP, including auto-correction of misspelled words and phrases. Code completion, however, is missing for JavaScript. You can view JavaScript in the Code Navigator, which provides a hierarchical view of JavaScript objects, functions, and variables, but this is limited to JavaScript (.js) files and does not work with JavaScript code embedded in a .php or .html file.

PhpED provides a number of toolbar buttons that accelerate the creation of HTML elements such as text boxes and check boxes. Click one of the buttons, fill in the fields of the entry form that appears, and the HTML code is poured into the document you're editing at the current cursor position.

Also, built into PhpED is a "lite" version of CSE's HTML Validator for checking proper HTML syntax. If you want to see what your application's HTML will produce in the browser, the IDE provides a rendered view. The rendered view is generated by an embedded Internet Explorer, but you can configure the IDE to launch an external browser such as Firefox.

PhpEd's database form wizard will build boilerplate PHP code for connecting to a database, as well as code for adding, deleting, viewing, and updating records in the database. Simply point the wizard at a table in one of your databases and enter the prompted parameters; the source code appears in a window, ready to be cut and pasted into your application. The wizard even produces JavaScript code to perform entry field validation. The NuSOAP wizard is analogous to the database wizard, but whereas the database wizard produces source code for database connections, the NuSOAP wizard will produce source code for SOAP connections.

PhpED is particularly intelligent about setting up debugging. For example, when we asked it to debug using a third-party Web server, it discovered that we had XAMPP installed and located the root directory for us. Applications can be executed and debugged in various modes. That is, your application might be a command-line script file (which requires only the PHP runtime), it might be small enough to run in the embedded Web server, or it might be elaborate enough that it requires an external Web server like Apache.

NuSphere's PhpED debugging a small PHP application. The Code Navigator (right) makes it easy to find components in different language contexts -- PHP, HTML, CSS, or JavaScript.

To handle this variety, you can launch PhpED's Settings Wizard. This wizard steps through a series of questions about the project type, where the project's root directory is, what the corresponding document root directory URL is for the Web server (if that's required), and so on. At its conclusion, the Settings Wizard will ensure that all the necessary settings are configured so that the PhpED debug/run infrastructure will operate properly.

PhpED's DB Client is built along the lines of a standard database explorer. It can connect to a wide variety of databases, including MySQL, Microsoft SQL Server, Oracle, PostgreSQL, and even Firebird. But it is primarily designed for exploring tables. You can examine the table schema (column names and data types), as well as view data. You can enter and execute ad hoc SQL queries and view the results. You cannot, however, graphically manipulate table data -- you must issue Insert or Delete statements. The DB Client is not available in the educational or standard editions.

The IDE's help system is a composite of toolbar selections and fly-out windows. This is a bit confusing; we were never sure which we should refer to. The toolbar selection is a collection of reference manuals, including a PhpED reference and manuals for PHP, MySQL, JavaScript, and so on. The fly-out help includes a Functions window, which opens into a navigable reference dictionary of PHP functions (for both versions 4 and 5), HTML, JScript, and VBScript. Another fly-out window opens a tree view into a miniature library of online manuals, including MySQL, CVS, HTML, JavaScript, and others.

NuSphere's PhpED is a solid IDE. Its embedded Web server and configuration wizards get you up and running quickly. In addition, NuSphere's Web site is exceptional, providing plenty of foreground information, as well as numerous video tutorials.

See the next PHP tool: WaterProof Software's PHPEdit

WaterProof Software's PHPEdit WaterProof's PHPEdit runs on Windows only; the company says it currently has no plans for Linux or Mac OS X. Though PHPEdit is not an open source IDE, you can download a fully functioning 30-day trial version from WaterProof Software. In addition, free personal licenses are available to students learning PHP (their qualifications must be reviewed by WaterProof), as well as organizations employing the IDE for nonprofit uses. Otherwise, you'll have to purchase a professional license (which start at €89).

In addition to the basic capabilities of project management, intelligent editing, and debugging, PHPEdit includes support for the Symfony MVC (model view controller) PHP framework, the free event-driven Web application framework Prado, and the open source CMS eZ Publish. PHPEdit furnishes all the editing fundamentals: syntax highlighting, Code Insight (code completion), live syntax checking, and code hints. The installed frameworks -- Symfony and Prado -- are recognized by the editing assistance components of the IDE. It's important that you use phpDocumentor syntax to comment your code; that's how Code Insight can -- among other things -- supply information about parameters of user-defined functions.

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

Opening PHPEdit's help system actually opens an explorer pane. The navigable trees within the explorer include MySQL, PHP, PHPEdit, and Symfony. However, PHPEdit's documentation appears to be a work in progress. Some of the help pages were empty in our version. In addition, English is apparently not the help authors' primary language; the documentation had numerous misspellings and awkward constructions. To be fair, the company is based in France, and odds are their English is better than our French.

Operations of the IDE can be automated via PHPEdit script files. The scripting language is simple, consisting of only "action" operations; there are no control structures. Nevertheless, you can customize the IDE virtually without bound; you can even access the actions behind all the IDE's toolbars and buttons. Unfortunately, while the list of available commands is massive, the help section describing them is incomplete. Some pages were empty; others included brief, one-line descriptions insufficient to deduce the command's characteristics.

One particularly nice feature of PHPEdit is its ability to focus on the type of code -- PHP, HTML, JavaScript, or SQL -- that you are currently editing. Click on a bit of JavaScript, for example, and the surrounding text fades to a light gray; the JavaScript stays dark. Also, PHPEdit has the unique ability to recognize an SQL statement, even one embedded in a text string, and offer Code Insight for the SQL being built.

PHPEdit has a welcoming "new project" screen that guides you through the process of getting all your PHP project's components properly initialized.

PHPEdit integrates with the well-known Xdebug debugger for debugging. The IDE includes a built-in server, adequate for small-scale PHP applications. For larger projects, you'll want to have an Apache server available. Luckily, getting a debugging session going with PHPEdit is made simpler by PHPEdit's configuration wizard. Also, if a debug session fails to start, a pop-up appears and offers to launch a debugger diagnostic, which steps through the verification of configuration details. It can determine what part of the configuration process you failed to properly set up. PHPEdit will also install a toolbar in Firefox. Click a debug button on the toolbar, and if the current page in the browser corresponds to a file in a PHPEdit project, the associated PHP file opens in the IDE, ready for debugging.

Setting up database connections in PHPEdit's database explorer is relatively easy, and PHPEdit supports all the popular databases: MySQL, Microsoft SQL Server, Oracle, and others. Actually creating a query is less straightforward, as we could find no guiding documentation. We ultimately figured it out, but PHPEdit's help system is truly an area that needs work.

PHPEdit nicely balances between parental hand-holding and polite guidance. Configuring any system for PHP debugging is often tricky, so it's good that PHPEdit detects debugging problems and runs a configuration tool in response. The IDE's one shortcoming is its woefully incomplete help system.

See the next PHP tool: Zend Studio

Zend Studio Produced in the heart of PHP country, from whence comes the core of the PHP runtime (the Zend engine), Zend Technologies' Zend Studio IDE is part of a collection of PHP-related products that includes Zend Server, Zend Platform, and others. Zend Studio is built atop the Eclipse IDE. In fact, Zend provides an Eclipse plug-in version of Zend Studio, in case you want to enjoy the capabilities of Zend Studio from within a vanilla Eclipse installation. We downloaded and tested the full Zend Studio installation for Windows. A 30-day evaluation version is available from the Zend Website.

When we first executed Zend Studio, it detected that we had not installed Zend Server and recommended that we do so. We downloaded and installed the free community edition of Zend Server. It is built on Apache Server and includes performance enhancements such as PHP byte code acceleration, data caching, pre-installed database drivers, and more. In addition, Zen Server is well integrated with Zend Studio; you can open the Zend Server administration directly from within Zend Studio. Also, when you create a new project in Zend Studio with Zend Server installed, the IDE will automatically set the new project's home directory in its proper location in the Web server's base (htdocs) directory.

[ 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. ]

When you create a new PHP source file, you can choose from a number of code templates to jump-start the file's content. Many are based on the open source Zend Framework. If you create a Zend Framework-based project (available as a project template), Zend Studio will prepopulate the project with components that support the MVC (model-view-controller) structure of a Zend Framework application and open an outline view that gathers each component into the appropriate category.

Because Zend Studio is built on Eclipse, its editing capabilities are virtually identical to those of Eclipse PDT. Its code completion for HTML, PHP, and JavaScript is pretty much the same as in Eclipse. In addition, all the familiar Eclipse constructs appear in Zend Studio: perspectives, views, and so on.

If you've installed Zend Server, setting up a debugging session in Zend Studio is easy. Zend Studio will locate Zend Server, and provided that you set your project's directory in the server's htdocs directory as recommended, debugging pretty much works out of the box. The combination of Zend Studio and Zend Server also simplifies execution profiling. Simply start a profiling session in the Studio and run your application, and Studio produces a variety of execution and coverage statistics, such as time spent in a given file, number of times a function was executed, average time in function, and more.

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