debuggable

 
Contact Us
 

Which Editor / IDE should I use?

Posted on 23/3/07 by Tim Koschützki

When you are a programmer you need a good set of tools. Every tool must be simple to use, but be able to serve its purpose. This is true for all coder's tools, but especially for the editor / ide (integrated-development-environmenz) that he uses. You must be able to edit source code as easy as possible, since source code is, well, the fundamental thing for a programmer. :) Let's take a quick look over various functionality your ide / editor should provide you with.

You should use only one editor

I think it's the best to only know one editor, but know it like your wallet. I am of the opinion that you should use it for everything - coding, documentation, messages, etc. "Why?" I hear you asking. Because, most editors have different sets of shortcuts, commandos, toolbars etc. If you are using PHPEclipse for your coding, Textpad for your documentation needs and a monolithic office-product to organise your todo lists and to type emails, you won't get as fast as you can get with only one editor. In each of these environments you will different commands and conventions.

You must use shortcuts. Using cut, copy and paste via the mouse will not be as efficient as using CTRL+X, CTRL+C and CTRL+V.

Choose one editor, understand it fully and use for all editing tasks. If there is only one set of shortcuts for editing tasks,you will not lose any time thinking about what was the correct shortcut for the search functionality. Some editors use "F5" for that, some use CTRL+F.

Make sure, that your editor can be used with all platforms that you are using.

Necessary Editor Functionality

Apart from the comfortable or useful functionality, that you like to use, I will present a couple of functions here that every editor should provide.

  • Easy configuration. Every aspect should be configurable as to your preferences. Especially shortcuts are important, because if you use them often, your hands won't need to abandon your keyboard.
  • Easy extensions. An editor should be able to cope with new developments, such as a new programming language being released.
  • Programmable. You should be able to program your editor for complext asks. This can be done via Makros or embedded programming languages.

Other than that your editor should feature the following functionality:

  • Syntax-Highlighting
  • Automatic indentation
  • Automatic completion of words, functions, etc.
  • Predefined text templates
  • A useful help section
  • Features that are common among IDEs - like an embedded compiler and debugger

Predefined Fileheaders

Most modern Editors / IDEs provide a useful feature that automatically writes a comment at the top of the file with the

  • Name of the class
  • Your name
  • A skeleton for declarations, like constructors, destructors, etc.

In PHPEclipse for example, you could automatically add PHPDoc tags as in here:

/**
  * File description
  * Created on <date>
  *
  * @author me <me @email.com>
  * @todo
  */

Code Inspection

When you are not so used to object oriented programming in PHP, it's a best coding practice to use an editor that provides code inspection. For example it provides with a list of all functions in your file. One c lick on a function scrolls to that function immediately.

This is of course true for an OOP setup as well. A very useful feature.

So which editor should you use?

There are actually various options here, ranging from Textpad over PHPEclipse to UltraEdit. These three are not only the industry standardin PHP development environments, but also in most coding environments using other languages as well.

For the PHP community there is also Zend Studio, the official ide made by the developers of PHP. Zend Studio is certainly a good and useful ide with many features that I discussed in this post. However, the fact that there is similarly good freeware, you probably should not invest into it.

PHP Designer is another good option, providing support for better HTML and CSS Coding as well.

However, if you ask me, for now PHPEclipse is the way to go, as it provides integration with debugging, web testing and your webserver. It also features code inspection, auto indentation, code highlighting.You can toggle functions and phpdoc comments to get a better idea for the big feature. ANotheri mportant fact isa lso that most professional teams work with itand it always looks good on your application when you have substantial experience with Eclipse.

What should you try to do now?

  • Explore all features on your currently used editor / ide
  • Surprise you colleagues that use the same editor with a cool new feature nobody has used so far
  • Use your editor's embedded programming language to automatize your work
  • Learn your editor's table of shortcuts by heart
  • Use your editor for all tasks, including programming, simple text editing, writing email templates, etc.
  • Decide whether you need a new editor / ide


 

You can skip to the end and add a comment.

Mgccl said on Jun 08, 2007:

Ever used Emeditor? I use it for everything.

Tim Koschuetzki said on Jun 08, 2007:

Thanks for the link. Will check it out tomorrow (I hope)!

Alp  said on Jun 12, 2007:

Also, take a look at Aptana: http://www.aptana.com/
It's currently for HTML, CSS and Ruby on Rails development and based on Eclipse. But soon there will be PHP support too.

matt said on Jun 15, 2007:

I use crimson editor. Light weight, color coding, regex search/replace, save/open to/from ftp and much more.
Plus it's freeware.

http://www.crimsoneditor.com/

Tim Koschuetzki said on Jun 15, 2007:

At the moment I am using a combination of Eclipse, PSPad and TextPad. I really like Eclipse with its PHPEclipse plugin and I think it's one of the best editors to go with.

However, I somehow got used to Textpad for quick n' dirdy tasks like bug fixing and refactoring long time ago. :) Oh and PSPad, because my chief programmer uses it and he *made* me use it. :D

Nils.R said on Jul 07, 2008:

Propably a "bit" late... but i can recommend textmate and vim!

Of course vim needs to be learned, but once you got it... just the best out there (i needed a week to get back to my previous level of speed). But yeah... if you dont wannt to bring up the time, stick to some IDE like Eclipse or alike.

Adam Duro said on Aug 24, 2008:

I'll also jump in and say that I LOVE using Textmate for pretty much everything. It's not just for Ruby on Rails as some would think. I've been able to use it beautifully for PHP (especially with CakePHP), HTML, CSS, JS, Actionscript 2 & 3, etc. I swear by it.

cilia  said on Aug 27, 2008:

I post my comment like... more than one year later ?! will it be useful ?
Anyway, my prefered editor/ide ATM is Komodo (activestate.com). I use Komodo editor (FLOSS) at home and the IDE (license to buy) at work. It's nice, Xul-based, and it validates some of your criterias.

* Easy extensions : it's mozilla-based, ergo there's an add-on manager ;

* Programmable : some tweak, macros and magic via python or javascript ;

* Easy configuration : well it's certainly not an eclipse-based IDE, but it can still keep your fingers on your keyboards for hours with a good macros (see above), and some emacs/vi command emulation :)

I'll stop here for the "review", but I think it's worth giving it a try.

Cass Surek said on Aug 28, 2008:

Once you use Eclipse, you never go back!

Perhaps www dot eclipse dot org/pdt is another viable solution.

I have been using it with good results.

kvz said on Aug 28, 2008:

Eclipse. Can be bitch to setup, but once you've tamed it, it's awesome:
http://kevin.vanzonneveld.net/techblog/article/my_new_ide_eclipse_pdt/

kvz said on Dec 03, 2008:

Turns out once you use Eclipse, you CAN go back ;) I've done a little writeup of my switch from eclipse to NetBeans thay may interest you guys:
http://kevin.vanzonneveld.net/techblog/article/my_new_ide_netbeans/

This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.