PHP DevCenter
oreilly.comSafari Books Online.Conferences.


Using Zend Studio for PHP Programming

by Michael J. Ross

Desktop application developers — using Java, C++, or any similar language — are accustomed to being able to choose from a number of powerful integrated development environments (IDEs), each of which typically brings together the functionality of a programmer's editor, a source-level debugger, source code management, a built-in FTP client, and more. As with any robust tool, these IDEs can take some getting used to, and a fair amount of time to thoroughly learn all of their features. But for most programmers, it is time and effort well invested, because it pays dividends in the form of faster development of more solid code.

Web developers, on the other hand, have not enjoyed an equally long history of project- and sanity-saving IDEs. But during the past several years, the tide has turned, and now web languages such as PHP are receiving a lot more software vendor attention.

One clear example of this is Zend Studio, created and distributed by Zend, headquartered in Cupertino, California. The organization bills itself as "The PHP Company," and not without reason, because it has a history of supporting the language, since 1997, including development and contribution of the Zend Engine, which is now PHP's execution engine.

Zend Studio for Eclipse is the company's latest update of its PHP IDE, and carries a version number of 6.0. As a foundation, it uses Eclipse, an extensible open source platform for software development that is growing in functionality and widespread usage every year. It also utilizes the PHP Development Tools (PDT) framework.

Zend Studio version 6.0 represents a new generation of the product, encompassing all of the functionality of version 5.5, which will continue to be maintained by Zend, with maintenance release version 5.5.1 coming out in January 2008. Jeff Koo, who is involved in Zend public relations and kindly provided information on both products, noted that Zend plans to continue maintaining version 5.5, to allow customers to make the transition on their own schedule. Version 5.5 will be the last non-Eclipse release of Zend Studio.

Product Editions, Requirements, and Pricing

Zend Studio comes in two editions: Standard and Professional. The Standard edition offers a complete source code editor (that supports PHP 4 and 5) and an interactive debugger for local PHP scripts. The Professional edition adds a host of additional capabilities, including code analysis, optimization, version control, and source management — covered in more detail below.

In this review, we will examine both editions — often comparing one to the other — but focus on the Professional edition, since it is the future product path.

In terms of size on disk, Eclipse itself is certainly not a small product, with the installation files of its various flavors currently varying from 63 MB to 153 MB. Including Eclipse and PDT into this newest version of Zend Studio is likely the primary reason why its installation file is much larger than that of version 5.5 — namely, over 290 MB versus about 68 MB. When installed on disk, the former consumes about 433 MB, while the latter consumes 157 MB. Unlike the system requirements specifications for most software applications, the Zend site does not mention anything about disk space usage.

However, the system requirements page does specify that Zend Studio runs on Windows 2000, XP, 2003, and Vista (32 bit only), Linux x86 and x86-64, and Mac OS X 10.4 with an Intel x86 or a PowerPC G4 or G5 processor. The system requirements for Zen Platform are also provided.

The cost for the Professional edition, for a one-year support subscription, is normally $399 USD, and $717 for three years. The introductory prices, as of this writing, are $299 and $498, during the first 30 days after the January 22, 2008 release. The Standard edition will continue to be priced at $99, and does not include technical support, though purchasers of the product can always upgrade to the Professional edition. For both editions, customers can choose either version 5.5 or 6.0, depending on whether they are interested in using Eclipse.

Installation and Start Up

After downloading the Zend Studio installation file for your particular operating system, there are several steps to installing the product. The two major ones are Configuration and Installation. In the former, you can elect to have the Zend Firefox and Internet Explorer toolbars added to your browsers. You can specify the target installation directory, as well as which file extensions to associate with Zend Studio. With this latest version of Zend Studio, installation was more straightforward than that of 5.5, which involved a 13-step process. In addition, installation of the full PHP manual is no longer optional; but having that reference information so readily available is certainly worth what little extra space it consumes. Lastly, in version 5.5, installation of Zend Core (which comprises additional extensions, libraries, remote debugging, etc.) and Zend Platform (a PHP application server) is optional.

When it starts up, the Eclipse version attempts to contact the IP address using port 4321. This may be part of the product's license protection. At least during the 30-day evaluation period, disallowing the connection did not appear to impede its functionality in any way. Also, at start up, Zend Studio (both versions) offers a usage tip; these can be disabled if so desired. In addition, version 5.5 first checks for earlier versions of the product; version 6.0 did not appear to do so.

If you intend to do any debugging of local PHP scripts, as most users will, and you sometimes shut down your local web server (for whatever reason), verify that the server is running, prior to doing any work in Zend Studio — otherwise you can receive a cryptic error message, "The selection cannot be launched, and there are no recent launches." A more descriptive message, such as "Web server not running," would be less confusing — particularly if the user has just selected (highlighted) some lines of code.

User Interface and Preferences

As with any IDE, the clarity and organization of the interface is critical to its usability and whether or not the programmer will continue to use the new tool, and not revert back to their previous development environment.

First we will examine the Zend studio 5.5 interface, and briefly discuss how it has changed with the Eclipse version. In both versions, the user interface has several components, consisting of panels, termed windows, located underneath the menu and toolbars. The windows can be adjusted in size and location, but by default the central one, the Editor window, contains the current PHP script being debugged, with the others arranged around it.

Zend Studio 5.5 - User interface
Figure 1. Zend Studio 5.5 - User interface

In version 5.5, the non-Editor windows (in counter-clockwise order starting in the upper left) are by default as follows: The File Manager allows one to work with files, projects, and SQL Server. It should be essential for large-scale projects, for which keeping track of their many components can either ease or undermine project management. Below that panel is the Inspectors window for the file, project, and PHP inspectors. At the bottom left-hand corner one finds the debug Messages window. To the right of that is a Debug window for monitoring variables, watchpoints, etc. As with any robust IDE, being able to easily step through code and watch the variables change value,alone makes it worth the price of entry. To the right of the code window is the aforementioned Debug Output window — enough to make just about any developer wish for a larger screen.

After carelessly adjusting some of these windows and making a bit of a mess, I searched in vain for a way to restore the windows to their default layout. I tried restarting Zend Studio and not saving the current workspace as a project, but that did not do the trick. Some sort of View > Restore Default Layout menu item would be a handy option for such situations. Admittedly, the windows can be dragged to new locations using a handle in each one's upper left-hand corner, but the behavior was fairly erratic, and I never was able to restore the initial layout.

These various windows can be seen in action when running the built-in Debug Demo, as shown in Figure 2.

Zend Studio 5.5 - Debug demo
Figure 2. Zend Studio 5.5 - Debug demo

Pages: 1, 2, 3, 4

Next Pagearrow

Valuable Online Certification Training

Online Certification for Your Career
Earn a Certificate for Professional Development from the University of Illinois Office of Continuing Education upon completion of each online certificate program.

PHP/SQL Programming Certificate — The PHP/SQL Programming Certificate series is comprised of four courses covering beginning to advanced PHP programming, beginning to advanced database programming using the SQL language, database theory, and integrated Web 2.0 programming using PHP and SQL on the Unix/Linux mySQL platform.

Enroll today!

Sponsored by: