PHP Platform I Write Code In

April 3, 2008

As I’m sure you know PHP as with most languages you can code right in a text editor on your home computer. However this might not be the most effective use of your time. I get asked a lot, what I use to code in. Well after trying quite a few things the ZEND IDE is about the best thing I’ve found out there. Now I know there’s some of you that are going to whine that it’s a little overhead intensive and yes you’re right. Zend is by no means notepad. However it brings a lot of tools to the table that make it well worth that over head in my opinion.

  1. Built in sFTP, FTP drive mapping
  2. Stepped debugging
  3. Robust code completion library
  4. Version control and management

Now if you’re going to use Zend I invite you to go to tools/preferences first thing and uncheck “Use OS look and feel”. What this does is it makes Zend try and emulate what the rest of your computer looks like. For example if you’re running XP like me it gives it the XP look and feel. Honestly I hear a lot that Zend is super slow and people just can’t put up with it. Well this is what makes it slow, turn this off and the performance will improve 10 fold.

1. sFTP/FTP Drive Mapping
What got me started on writing this post is I was at nickycakes blog today and he was talking about drive mapping. I’m sure if you’re just starting or when you started with all this PHP and servers stuff one of the biggest pain in the butt’s was figuring out how this all worked. When I first started I used to run a copy of WAMP on my local machine and code everything locally. Then when I finished it and got it working I migrated it to the server. If you’ve ever done this you know the headache this can be. Windows has a totally different file structure. Permissions can be a pain in the ass and so on. Also once you have it on the server it’s going to require some debugging ( funny how software writing works that way ). So when I first started I’d download the file, edit it, upload it and test. As you can see doing this 100 times can be an arduous task.

Zend to the rescue. With zend you have a file manager in your left pane by default. In this pane all you have to do is left click then hit “add FTP server”. A window will pop up that will ask you the details of you FTP or sFTP connection. Then once you hit ok it’ll connect to the server and map a drive into Zend just like another hard drive on your local box. You can open, edit, close files all in real time which totally eliminates the upload/download task. This also allows you to build in real time on the server where the scripts are going to reside in the end. One thing to take note of. If you’re used to coding locally and uploading you always have a sort of backup of a working version online. Now that you’re controlling things in real-time you can easily write over something that works with something that doesn’t. Remember when you hit save the old file is gone.

2. Stepped Debugging
When I first shifted to PHP I came from a small background in Visual Basic and developing in Visual Studio. Well visual studio has very very robust debugging tools. For example if ( this is for php only coders ) you could hit run and it would go through your script step by step. Then as it’s going through you could mouse over each variable, object, array or whatever to see what was contained in it on that line. You can then make some tweaks and run that same line again and see if it fixed it. Something like this might be useful right? Well Zend has debugging built into it. And you can set it up so that it works direct on your server.

3. Robust Code Completion Library
This was HUGE when I was new and didn’t know many of the functions at all. Code completion allows you to start writing a function and it will bring up a list of functions to finish it. For example let say you’re looking for a string function to do something. Well you know that most of the string functions start with a “str” so you start typing that and it pops up the whole list of functions that start with “str” then you page down the list and find the one you’re looking for. When you type the complete function it shows you 1. a description of what the function does, 2. what the function takes as inputs and 3. what the functions generates as an output. This can be extremely helpful and save you a lot of time from going to php.net. Zend also has a powerful real-time syntactic code check. Just like when you’re working on a word document and it underlines grammar mistakes in real-time so does Zend with your syntax. It’s very useful to see if you missed a bracket here or there which you might spend a good amount of time debugging.

4. Version control management
If you’re working with a team on a single project and sharing files this can be really useful. Also is very helpful if you want to make backups along the way in an easy fashion. Zend supports both CVS and SVN. I’m not going to get into a lot chat about versioning. But just know it supports all the features of versioning natively.

5. I’m sure there’s other things I’m not thinking of right now.
If you’re reading this and use the Zend IDE feel free to add them in the comments.

That’s just a few reason to give Zend a shot. I can guarantee you with the tools it provides it will help you learn faster and speed your coding up. Don’t be lame and try it for a day or two. Really give it a shot as it’s a complex program that takes some getting used to. But will save you time and improve your coding once you do.

newsletter

Want More? The more people listening the more I’ll write.
Subscribe to get business insights in your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.