Zend Studio 11: A Pretty Big Deal

Development Tools
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times


This small package packs a powerful punch, providing many facilities that all PHP programmers definitely should have at their disposal.


Last month, we talked about the Zend Server, the Garth Brooks of the Zend world, and how it can be used to provide an effective environment to run PHP programs from the IBM i. Now we will move on and talk about Zend Studio, the Ariana Grande of the Zend world.


Zend Studio is an Integrated Development Environment (IDE) similar to RDi. It provides a single spot where you can write and debug your PHP scripts. As such, it is an adjunct to the Zend Server, which provides the structure and services you use to run those scripts. Zend Studio is built on the open-source Eclipse platform and is therefore ideally positioned for other open-source plug-ins to connect with it. And guess what? It runs on Windows, Linux, and the Mac! Gotta love that.





Sometimes it's hard for me to think of IBM as a benevolent sort of beast, but maybe it is. If you remember from last month, you can get the Zend Server, try the primo version for a month, and then after that, keep using the basic version for nothing. Of course, you don’t get updates or new releases, but the basic product works quite well, so it's a pretty good deal. Well, the same thing is true for Zend Studio. You can download it and get one year of support and updates for free and then at the end of the year keep using it for free (but without getting any additional updates). And that pricing policy is only for IBM i people and is courtesy of IBM (and Zend). They’re a swell bunch of fellas (and gals).



How much is a license (if you do want updates and new releases)? Keeping in mind that any pricing info I would give you is a snapshot as of that moment and may not be accurate by the time this article comes out, I'm seeing a per-year cost for one user on Zend Studio being about a hundred dollars. If you check out the pricing details on the Zend website, you can get up-to-date information as there are four price packages available. Take a look yourself and see what works for you.


What Can it Do?


Of course, the big question is, who cares how much it costs? What will it do for me? Why should I even bother?


It's true that you can write all your PHP scripts on a simple text editor, even one that you downloaded for free. And that's the way I started, so you can't get much more normal than that.


Of course, a text editor doesn't provide debugging capabilities, so it's ideally suited to those who don't have any bugs or problems in their code. That's not the type of PHP programmer I am. I really need a debugger. Mostly, I need a syntax-checker, though. Something to remind me that I spelled "session" wrong or forgot a parenthesis. A text editor doesn't do that either. So, for a programmer like me, a bit more sophisticated IDE comes in handy. But what specifically does Zend Studio do for you?


Productivity Features


While it sort of looks like a text editor and you can enter text into it, the Studio provides a number of special features that a text editor won't necessarily have. Things like code completion to make the task of doing a particular code structure faster.


There's also a code syntax checker, and you can sync that up to a particular version of PHP because the syntax and what is allowed does vary from release to release.


The Studio also helps with refactoring, or applying small changes to a code section in an effort to improve its modularity by allowing you to easily rename elements and files, move files from one directory to another, and extract or replace either variables or methods.




This is the big one for me. Without something like this, you're pretty much reduced to putting "echo" statements into the script to try to follow along with what's happening. And that point is rendered moot if the mistake you make happens to take out the entire screen so that the page is blank. That generally doesn't happen to me, though. At least not more than multiple times per day.


The debug facility really functions in two ways; first to help you remove bugs from your code, but also, using the Profiler, to spot performance bottlenecks and remove them before you put your code into production.


In terms of debugging, the Studio comes with its own debugger, ZendDebug, but it also supports the very well-known open-source debugger XDebug so that you can use either of them. Unfortunately, I don't believe it's possible to use both at once as a kind of mano e mano debugger showdown. Might be interesting.


The debugger allows you to set breakpoints, step through your code, interrogate your variables, and suspend launched programs. In other words, do all the things we are used to doing within RPG.


The debuggers can be used on either local code or scripts that are on a remote server, including the cloud, so it's perfect for both development as well as production troubleshooting.




In the RPG world, we talk about programs, which are more or less comparable to scripts in PHP. But in the PHP world, since everything is so much more modular, we tend to talk about "projects," and the first step when you're starting something new in Studio is to create a new project.


Why am I talking about this? Just to add a few extra words. No, seriously, I have to get up to a certain minimum word count. So I thought I would throw that in. And since I have mentioned it, I should also say that most experienced people in the PHP world build their projects on a framework. So the ability to integrate your development environment (Studio) with the framework you want to use is essential.


That is, the framework is sort of like an application model. Because we're dealing with the web, with remote servers and web servers and weird stuff like that, a lot of specialty modules are sort of required to do this communication and they really have nothing to do with the business problem you are trying to solve. In an effort to improve productivity, PHP people began developing generic modules for some of these scripts and organizing them in a particular way by using a framework.


Now in the Ruby world, there's really only one framework that's cool to useRails. But in PHP it's an all-out brawl. You have Symfony, Laveral, ZendFramework 2, and many others. And everyone has their own reasons why one or the other is the only framework you will ever need. To maximize your efficiency, you create your project based on a framework model and import the whole mess into Studio so you can massage the code that has already been written and add more modules into it. And the advantage of Studio? It interfaces with a wide variety of frameworks right out of the box.




The other big difference between the web world and the real world of RPG is in deployment. For RPG, all we usually do is transfer modules from test to production libraries. But in the web world, it's more complex and harder to control.


Studio is not a deployment coordinator per se, but it has full integration with Composer, an application-level dependency manager (I know that's true because I copied it right out of Wikipedia) that's a powerful tool in terms of deploying applications, particularly if the app is going to multiple sites, which often happens with web thingies.


What's New in Studio 11


Everyone in the Zend world is really excited these days. The latest release of Studio, Zend Studio 11, is out, and it features quite a bit of new functionality.


First, it offers new support for helping to develop mobile apps, certainly a big deal today.


Second, this is where a lot of the new framework integrations have been added in.


Third, there's more support for development and deployment on the cloud, including some of the leading cloud offerings (Amazon, Azure, SoftLayer, Open Shift, Red Hat, etc.).


And fourth is the addition of Z-Ray, which is an article all on its own, so let me just say that it gives you unprecedented information on the performance of your app and really helps you see where you're losing time.




As I look back over this, it almost seems like an advertising piece. So I tried reading it again, looking for bad things I could say or rumors I could start. It's honestly not like Studio is perfect. I'm sure there are things about it that would make a sailor's girlfriend blush. But all in all, it's a pretty great product. And when you consider the integration it has with Zend Server, well, it's pretty hard to ignore.


But here's the real crux of the matter. I went along just using a text editor for PHP for a long time. Strangely enough for someone who writes about technology, I take to new things pretty slowly. And using the text editor just flat out slowed down my learning curve. And it made a lot of things tedious.


Studio is a product, but it is also a tool, the kind of tool that should be in every PHP programmer's pocket. So there.


Oh, and don't worry. I more than exceeded my word minimum. Don't know why I was so concerned.