Zend Studio IDE knowledge nuggets!

I recently realized a few things that I didn’t know about the Zend Studio IDE. As many know I have used the Zend Studio IDE for PHP development for some time. All along I have been using the templates built into the IDE, and never realized that they could be changed since I had no need. My coding standard for years has been the same as the default templates built into the Zend Studio. However, my new employer has a large percentage of coders using Vi who had a different standard in relation to white space than I did, and they were not open to changing their coding standard to meet my Zend Studio preference.

So I had a dilemma. How could I continue to produce speedy PHP using the IDE if I had to type out functions, classes, and “if” statements 100%? (I feel that I save a significant amount of time using the template auto complete shortcuts.) The alternative was to continually edit these constructs after allowing the code completion to insert them.

Well, I went in search of a way to make the Zend Studio bend to my will. That is when I was pleasantly surprised to find how incredibly easy it was to change them. All I needed to do was simply click >Tools->Preferences, then select the “Templates” tab in the Preferences. From there I could edit any of the built in Templates that were there.

This may sound like a simple matter, but since I had no need in the past to change them it was like a hidden feature. So I decided to share it here for others that also have not found it yet.

This led to me hunting around, and I found another very useful tool in the Zend Studio IDE, “Snippets”! These can be found by clicking >Edit->Show Snippets. This opens a wealth of code snippets written by other developers that were submitted for anyone’s use. The first time I opened this it asked if I wanted to update the Snippets from Zend. Of course I said “yes” to get the newest versions and largest selection. There are so many Code Snippets here ready for use that it is like going to Sourceforge or Hot Scripts without the browser.

The next time I need an idea for some code I will make the Code Snippets my first stop. There is everything from UPS and USPS shipping calculators to Amazon XML connectors, and shopping carts to chat scripts. I even see that there are convert to PDF, as well as web based game scripts.

Happy Coding.

By Adam

Speaker, author, consultant, OSS contributor, SoFloPHP UG and SunshinePHP Conf organizer, RunGeekRadio Host, Long distance runner and ultra marathoner.