OS X Development Editors: 2009 Edition
Starting in late January, I started searching for a new editor to use when coding PHP. I spent at least a few days with the different programmer editors that are popular on the OSX platform. Starting with Eclipse, here are my opinions and reviews.
As might be obvious from the title of the blog, I spend a lot of time coding in PHP, shell scripts, HTML, and have recently picked up some Lua. Note that I don’t usually use the IDE functions of these development tools (where they have IDE functions) — I typically use the webserver and/or unit tests to make sure the code runs, and firebug and inline debug statements to verify variable contents. My methodology seems primitive in some ways, but it keeps my development velocity up for some reason.
My standby for years has been good ol’ command line vim. I have an extensive and highly customized .vimrc file, I use exuberant ctags to pull functions in for autocomplete, and I use the Project plugin to navigate files. It’s highly customizable, and it’s gotten me through years and years of PHP development. However, working with a large Zend Framework project with APIs and modules can be a bit beyond it’s Project UI’s abilities, and I can’t keep enough files open in it at once (or move between them fast enough) to keep me happy.
Eclipse: I spent late December and January working with Eclipse. Eclipse is a Java IDE that’s been popular for years. If you know what I mean when I say “It’s Java” … you can stop reading now. It’s still Java. I used the specialized PHP context (aka PDT) and enjoyed it, although it took me some time to get used to specific quibbles about the UI, including the way that HTML tags autocomplete. I think I also had to get used to using arrows in places where I previously would’ve used the enter key or spaces. Unfortunately, when my application got big, the autocompletion dropdowns started to get REALLY slow. And by “Really” I mean “When I typed `Zend_`, I could get up and get a soda and walk back to my desk before it completed.” I didn’t get fancy with the SVN or other plugins because I couldn’t figure out the configuration without blowing away PDT.
Total Eclipse/PDT usage: 30 days. Reason for moving on: It’s Java.
TextMate: It’s nice to have a bundle for everything, but the first thing I missed was autocompletion. I can’t really say anything great about TextMate because of two things. First, when it was running, my SystemUIServer and WindowServer lagged all to hell. I thought it was Firefox and/or one of it’s plugins at first, but finally figured it out. I’m the kind of person that leaves a program open for weeks, really only stopping things when they need to be upgraded or the system needs to be restarted. When it got past the point where alt-tabbing took longer than a bathroom or soda break, I ended up quitting TextMate and never opening it again. I remember that happening the last time I tried TextMate too, which was more than two years ago. Ceasing to use TextMate solved my SystemUIServer and WindowServer lag issues and I can’t recommend it for anyone.
Total TextMate usage: 22 days. Reason for moving on: Slowed down my entire system.
BBEdit 9.1: I didn’t really get serious about reviewing development editors until I hit BBEdit. I downloaded the Version 9.1 demo on 14Feb09, when I fell most decidedly out of love with TextMate. It struck me as weird that BBEdit defaulted to HTML syntax view for PHP files and didn’t have anything specified for .phtml files. BBEdit’s configuration options are confusing. It took me forever to get block opening/closing brace matching working. When it was, the unmatched brace flashup was annoying as all hell. And then it doesn’t even match when you move over one; to find a block’s match you need to delete and retype it.
Annoyingly, BBEdit’s configuration options don’t take effect on the currently open files — you have to close files and then reopen them. I encountered a number of bugs with the soft wrap features — it seems that there’s a per file soft wrap setting as well as the global setting. Maybe they weren’t bugs, maybe they were features. Either way, the configuration settings are so fast and so unfocused that a setting could be virtually anywhere in the program and overridden somewhere in the menus. BBEdit is definitely past it’s prime.
Total BBEdit usage: 3 days. Reason for moving on: Frustration with configuration.
Coda 1.6.2: I first tried Coda in 2007 when 1.0 came out. I thought it was great for developing static websites and javascript, but with the big object-oriented PHP projects I work on, it was seriously lacking features for application developers. A lot has changed since then — subversion integration works well, the code viewing and navigators are mature and easy to use for navigating large files, and the level of polish is exactly what you would expect from a Panic application.
I want to take a moment to call out the subverison integration. Holy crap, but does it work well! The status window is a joy to work with. There’s a few little bugs, but it detects externals and other properties perfectly and just plain makes stuff awesome to work with. I wish they’d release the subversion integration on it’s own. I prefer it to command line or any of the other standalone applications. The only downside is that it doesn’t pick up at all on metadata changes. It *will* pick up that you are pulling in a library via externals, but it won’t detect when you change that path and update via the command line tool. (I nearly missed updating a live codebase to Zend Framework 1.7.5 due to this…) Likewise, it will pick up a propedit svn:ignore, but it won’t commit those changes. Minor sin, but one that’s important to note.
Now, the bad: The completion features suck when you’re using a framework. I don’t need something that will complete “ingres_query” for me; I need something that will complete “Zend_Controller_Plugin_Abstract”. Coda’s autocompleter (which is inconveniently placed on esc/f5) does not seem to be aware of functions that you’ve declared elsewhere in your file or application.
Total Usage: 30 days, interrupted only by an AppleCare visit and drive reformat. Lots of love, especially for the svn integration, but still frustrated over the stupid autocomplete.
Espresso: While I was reviewing it, they went from Beta to 1.0… and I was busy in the garden, so most of my coding was done with the post-1.0 version. Just like Textmate has bundles that contain snippets, code highlighting, and other extra language-specific functionality, Espresso has “sugars” that contain autocompletes, function profiles, etc.
I’m sure they’re improving things drastically, but importing sugars can kind of be a pain for users who aren’t used to mucking around in their Library. There isn’t any check for duplicate sugar versions in 1.0, so the pre-1.0 PHP sugar that I had installed was not distinct from the bundled sugar in 1.0. The library doesn’t seem to detect or override these things. Tab-as-spaces is a feature in the preferences pane, but doesn’t seem to work properly. The “tabs” are kept in the left hand “workspace”, but aren’t actual tabs across the top… I’m not sure if this is a theme thing or a built in thing, but it’s weird.
All in all, it’s a VERY fast, easy to use, promising editor… but it’s a few features short of being a usable daily editor for me. It can definitely replace TextMate for most people, and considering how bloated that pig is, it might make your life awesome. On the other hand, it’s freaking expensive at 60 british pounds… that’s ~$90 or more (depending on fees) in $USD as of this writing. It might be worth it, and I was tempted to hack up a quick Zend Framework sugar just to get autocomplete for the stock functions, but damn, that’s hefty for an application that’s barely not beta.
Total Use: 2 days. Reasons for moving on: Still no in-document or in-project autocomplete, and holyshit at the price. Would recommend: If you can stomach the price and you need to replace TextMate.
I specifically didn’t consider…
- Zend Development Environment, which is Java, based on my experience with Eclipse. Plus, it’s expensive and the project management functions are just plain stupid.
- gvim/macvim, which doesn’t have a “tray” where I can load my hierarchy of files… at least, not that I could find, unless I used the Project plugin, but that then displays it in the editor section instead of a tray/drawer.
Results
Frankly, Coda was the editor that I enjoyed using the most. It’s price is reasonable, and I can get autocomplete into it fairly easily. Any that I missed that deserve another look?
I’ve been using PDT for some time, and when I started using it, I had all the Eclipse-related problems you mentioned. But there are a few simple things you can tweak that change it from an unusably slow IDE to the best PHP development environment I’ve used so far.
Most importantly, it needs to be using a recent version of Java. I don’t know what the Java situation is like under OS X, but certainly under Linux, by default it used to use the Ubuntu-supplied open source version of Java. Installing Sun’s latest Java binaries and telling Eclipse to use them sped things up by an order of magnitude.
Secondly, allow it to use more RAM. There are some config params which you can tweak to help with this (google for Xms and Xmx). From what I remember, the default limit is either 128MB or 258MB. I changed this to 1024MB.
The biggest project I have open at the moment is about 40MB of PHP code (including ZF and some other libraries, excluding SVN dirs), and the auto-completion menu when typing Zend_ does open instantly.
Disabling the validators can help with speed if it’s still slow after all that, and I agree that the way the HTML auto-completion works is annoying (I disabled this).
I think some developers will always prefer text editors over full blown IDEs and vice versa. And of course the spec of the machine you’re developing on is a big factor. But I do think Eclipse is let down a little by some poor default settings, and the stigma associated with Java apps. Once you get it working, it’s great.
Hi Karl,
you should definitely take a look at Netbeans but be sure to download version 6.7M2 or newer as they revamped the UI and added some really nice PHP integration. There are also a lot of plugins e.g. SVN, Git, integration testing…
Greetings and happy testing.
Komodo IDE. Hands down, bar none, the best PHP/HTML/Everything web related editor around. Well, in my opinion of course
You should definitely check it out. The lighter version called Komodo Edit is, I think, free and very well capable. The IDE versions comes with a bit of a hefty price tag but well worth it.
Plus, it’s not to shabby to look at either.
Hi,
I’ll second Netbeans (although I’m still on 6.5.1). They have a version tailored specifically for PHP (so no Java or C++ syntax/library overhead). Yes, it’s Java, and yes, like most people I initially thought “no way”.
But like you I code large ZF-based projects. And as much as I *love* Coda, it is simply too painful coding without proper auto-complete.
Netbeans will happily parse the /library folder for you, so everything in Zend (or any other library for that matter) will appear in the autocomplete. It also parses variables defined in your script, so $a-> will pop up an autocomplete of methods and properties for the class $a was defined as.
SVN integration is very good (I don’t use it as such an advanced level as you though, but all the standard functionality works fine).
One thing: if you find netbeans hogging the CPU, switch off the Tasks plugin, as otherwise it rescans all your source code (not incremental changes) for TODO,todo etc every time.
Bottom line: if Panic make Coda more Zend-friendly, I’d ditch Netbeans in an instant. As it is, Netbeans si the best ZF IDE on Mac that I have found to date.
Yup. Netbeans. And, yup, I’d switch if Coda had decent code completion. It ought to, at the very minimum, parse classes and variables in your project and offer intelligent code completion suggestions. You listening, Panic?
well look what google rustled up.
when I’m working on PHP I use TextMate or Vim. neither are perfect, but where one fails the other generally does very well, so I’ll generally have both open.
TextMate isn’t the fastest creature, but there are some 3rd party tweaks you can apply that make it run faster by doing things like disabling project re-scans when the app regains focus.
Hi Karl
Are you still using Coda for ZF projects?
I’m in the same position as many of you here above: wants a editor with project-wide autocompletion but just can’t stand the Java based one.
I just don’t understand why Panic or MacRabbit can’t do “The Ultimate PHP IDE for Mac”?
@tim from first post: Thanks a lot! I’ve increased the xmx and it’s lightning fast..
Coda is still my editor of choice because of the large clip library I have built-up over the last three years of using it. I don’t trust their svn for the reasons that you mentioned, but their Terminal is pretty good. They still need to fix the lag time on the sites thumbnail page, though…
@Magnus von Bromsen – “The ultimate IDE” for any language is A LOT more complicated than the glorified, svn-aware FTP client that Coda is. And it seems that Panic spends more time messing with the CSS rendering than real features like auto-completion, code-parsing, style enforcement and syntax highlighting (jQuery in an eZ Publish template anyone? I gave up…). IDE vs Client is a world apart.