PHP Docblock Generator plug-in for Coda is Better, Faster, Stronger

Work and life has been keeping me crazy busy lately, so I’ve been sitting on this release far longer than I’d like. By way of apology, please accept version 1.0 of my PHP Docblock Generator plug-in for Coda. I promise this guy was worth the wait.


The new version is Better, Faster, Stronger. Head over to the project page to download it and try for yourself.

Better, Faster, Stronger

The new PHP Docblock Generator plug-in is smarter. It’s better at guessing parameter types from method signatures. It pre-selects the docblock description so you can simply start typing if you aren’t a fan of the auto-generated text. It knows about PHP 5.3, so it makes fewer dumb calls.

Version 1.0 is crazy faster. It documents more things, parses more code, and does it in far less time than the original plug-in.

It’s also more future-proof. The previous version of the plug-in hit a wall, where more features couldn’t be added without sacrificing simplicity or speed. It was limited by the feature available to script plug-ins, so it couldn’t do cool things like pre-selecting the guts of the docblock.

Re: Coda Plug-in APIs; Prob’ly more than you cared to know

This is a complete rewrite from the previous plug-in. The old version used Coda’s “script plug-in API”, an ingenious API which makes it crazy simple for developers to write basic plug-ins for Coda. Unfortunately, this simplicity comes with a few limitations, most of which rhyme with “speed” or “features”.

The other option for writing Coda plug-ins is the Cocoa API. Generally writing Cocoa plug-ins for Coda means creating a new Xcode project and stumbling through the Coda API documentation until you figure out how to hold your tongue exactly right to get you plug-in to compile and work. Also, it involves writing your plug-in in Objective-C. Granted, things could be worse, but writing a native Cocoa plug-in for Coda makes me wish for the simpler days of the script API.

Luckily, there’s an awesome middle ground: Coda Plugin Skeleton, an awkwardly named framework for writing Cocoa plug-ins in PyObjC. This gives you the simplicity and awesomeness of Python (read: one of the best features of the script plug-in API), plus the feature set and speed of a native Cocoa API to interface with Coda. It’s basically the best of both worlds.

How can you survive without this?

Visit the project page to download PHP Docblock Generator 1.0.

Happy coding!