About IT and Sports

My Web development experiences and sports encounters


Posts Tagged ‘IDE’

Choosing a PHP IDE

Working with PHP  the past 10 years I have been tweaking my code with quite some different editors. From simple text editors to fully featured Integrated Development Environments (IDE). In this article I will outline what I think is important in choosing your editor of preference. Furthermore I will discuss some of my experiences with different editors.

IDE’s offer a lot of advantages in comparison to text editors. Still I think it is useful to learn a command-line text editor. Most of us are deploying on a linux/unix environment. Sooner or later you will have to edit a file directly on the server. Knowing how to use ‘joe’ of ‘vi’ may come in handy. My preference goes to joe (probably because I managed to remember the keyboard commands for saving, searching and copying). One disadvantage is that joe is not always installed. That’s the big advantage of vi. It will probably work on every server. The vi editor is a little more complicated, but can be very powerful If you are able to manage its functions.

Now let’s focus on PHP IDE’s. Before looking at the products out there, what is important when you’re dealing with PHP code. First of all there are the default functions you will find in all IDE’s: code highlighting for PHP, html and javascript, project management and file browsing. Differences can be found on other functionality:

1. Code completion. Being able to see methods in a class and parameters in functions makes a programmer much more efficient. If you are a serious programmer, you actually can’t do without code completion.

2. Ftp projects. When you work on many projects because of short lead time or long support agreements, you want to have quick access to staging or production environments. It would be best practice to use version control tools such as CVS or SVN to manage your code on remote servers, but not all servers are equipped this way.

3. Class information. Easy overview of methods and properties and access to extended classes makes your life easier.

4. Text search. Every programmer searches trough code to find code snippets. How did I do this before? Does the framework already have what I need?

5. Variable highlighting. Because PHP is weakly typed, you will not easily notice typo’s in variables when running your app. If your editor can manage these variables, you are likely to make less mistakes.

6. Debugging. Stepping through code can help you to find complicated bugs quickly or learn to understand a new application. The best know debuggers are XDebug and Zend Debugger

IDE’s most used by PHP programmers are Eclipse PDT, Zend Studio, Netbeans, Aptana and Komodo.  Open source and free are Eclipse PDT and Netbeans. Komodo has a free community edition (Komodo edit), but this version is stripped. To make a valid comparison you need to buy the commercial version (Komodo IDE). Zend Studio 7, Eclipse PDT and Aptana are based on the Eclipse framework.  A few years ago Zend made the decision to base Zend Studio on Eclipse. The old Zend Studio is still available. The last old Zend Studio version is 5.5.1.

You’re probably tired reading by now. Well… a least I’am tired writing. I will continue this article in my next post in which I will discuss the pro’s and cons on these IDE’s. And to give away a little secret…. I am still using the old Zend Studio.