PHP DevCenter
oreilly.comSafari Books Online.Conferences.

advertisement


Using Zend Studio for PHP Programming
Pages: 1, 2, 3, 4

When attempting to optimize one's PHP code, one of the most valuable tools is some sort of profiler, which reveals how much time is being consumed by each part of your code. Zend Studio has a built-in profiler, illustrated in Figure 10.



Zend Studio 6.0 - Profiler
Figure 10. Zend Studio 6.0 - Profiler

Browser Toolbars

It was noted earlier that during the installation process, you can elect to have Zend Studio toolbars added to your Web browsers. At this time, the two supported browsers are Firefox (shown in Figure 11) and Internet Explorer.

Zend Studio 6.0 - Firefox toolbar
Figure 11. Zend Studio 6.0 - Firefox toolbar

The first icon launches Zend Studio. The second begins debugging of the page currently open in the browser. If Zend Studio is not already running, it attempts to launch it. Unfortunately, it assumes that the product was installed in C:\Program Files\Zend\ZendStudioClient-5.0.0\bin\.

Zend Studio 6.0 - Browser toolbar error message
Figure 12. Zend Studio 6.0 - Browser toolbar error message

Note that "Extra Stuff > Preferences" refers to a menu item in the browser toolbar itself, not in Zend Studio proper. Users who wish to fix the configuration setting, and who search for it in the program, will be unable to find it, and it is apparently not even mentioned in the online help information.

The third icon is a drop-down menu for debugging the current page, the next page, all the forms on the current site, and all the pages on the site. At first it seemed odd that of all five icons in the toolbar, it is the only one unnamed. But the logical name would be "Debug," which is already used by the third icon. This suggests that those two menus should probably be combined into one.

The fourth icon is for profiling the current page. Even after modifying the configuration setting to point to my Zend Studio executable, neither this one nor the second icon worked as expected.

The last icon, "Extra Stuff" contains the toolbar settings, as well as links to Zend and non-Zend PHP sites. Thus, a much better name for the menu would be "Resources."

The toolbar, like Firefox itself, also has a built-in search facility, for searching the Zend.com site, the Zend knowledge base, PHP.net, and the entire Web via Google.

Zend Framework

PHP projects are increasingly being built upon open-source frameworks, including Zend Framework. Zend Studio has extended support for Zend Framework — facilitating the creation of Zend Framework project directories, etc. It is built into the Eclipse version of the product, and will be added to the 5.5 version with the release of 5.5.1.

Zend Studio 6.0 - Zend Framework
Figure 13. Zend Studio 6.0 - Zend Framework

Support

Most open source IDEs suffer from — and make the user suffer through — inadequate support, usually just pointing the frustrated user to a mishmash of useless "documentation" or a forum seeing little traffic. Zend Studio, on the other hand, is bolstered by an adequate amount of helpful resources. The built-in help information is extensive and completely indexed, and it offers full text searching, with highlighting of search terms. It also has the filtering capability discussed earlier in regards to limiting the preference options. Yet even with the ability to filter help entries, it would likely be of great value to the new user to have a section devoted to quick start guides.

On the Web, Zend's support page offers a knowledge base, forums, and FAQs. The Resources page has links to some Release Notes, a User Guide, an Installation Guide, a Datasheet, a Quick Start Guide, and the Official Keymap. Several informative videos for version 6.0 can be found Zend's Demo Videos page.

Furthermore, licensed users can obtain technical support online, by submitting a ticket to Zend's Technical Support Team.

Conclusion

Zend Studio, especially the Eclipse version, has a great many capabilities — more than can be deeply explored in a single article. Not discussed here are the built-in tools for code refactoring, database tools, working sets, and integration with external Zend tools, such as Zend Guard. Interested readers are invited to test these capabilities on their own, and see how much value they add to one's unique development needs.

One advantage that Zend Studio has over some if not all similar PHP-capable IDEs, is that it has a PHP interpreter built into it. As a result, you avoid the installation hurdle of informing the IDE as to where on your computer it can find a PHP executable. This may sound trivial, but one major non-Zend IDE that I tested refused to recognize a perfectly working PHP executable as valid — thereby making the IDE unusable. In the case of Zend Studio, it has the Zend Engine built in, and both versions 5.5 and 6.0 support PHP 4 and 5, while version 6.0 is more customizable, and even allows you to assign your own interpreter and own extensions, if so desired.

Aside from the minor problems and suggestions mentioned above, Zend Studio is a powerful, impressive, and potentially valuable IDE that should be tried by all PHP programmers who want to make their development efforts as painless as possible, and are willing to invest the time and effort to learn how Zend Studio can do just that. Zend Studio is strongly recommended to individuals and teams building PHP applications.

Michael J. Ross is a freelance web developer, working primarily with Drupal.


Return to ONLamp.


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: