One set of developer tools for Drupal
There are many useful editors and debuggers useable to churn out Drupal code. However, most popular IDEs are written in some non-native language, so they are so very resource intensive and because of that, so slow that I just can't use them. This includes Eclipse, Zend and Komodo. So, this article will not be about these. Neither I will write about the virtues of vi or emacs -- I use much simpler tools.
To begin with, I run Kubuntu Linux. Why that? Mac OS X does not recognize the WiFi in my laptop (and it's not the kind of laptop where you can just switch miniPCI cards). Next up would be maybe Windows, but I want to work instead of wrestling with an operating system that never does exactly what I wanted -- it sometimes does less, sometimes more and sometimes simply does not let me do certain things. I happen to have quite some experience with Linux on servers, so running Linux on the desktop is not that hard either. Which Linux, though? I very much like the APT package manager and out of the distros built around it, I like Ubuntu most (and I am not alone...). The choice between KDE and Gnome was easy, Linus Torvalds famous letter puts this into words better than I could. So we arrived to Kubuntu Linux. In general, the OS behaves rather well with my laptop (aside from a small issue with brightness), and all the issues that were a nightmare for years (WPA for wifi...) got really smooth and simple this year. So Kubuntu Linux is now a pleasure to use. Aside from the operating system, I only deal with source code, so I need something with which I can edit, view, control and search.
I almost always work remote, so easily accessing files remotely are very important to me. It so happens that KDE has an excellent "io slave" subsystem. It means I can open a dir like fish://user@example/home/user/ and it'll SSH in to user@example and show the dir as if it would be local. There is a webdav kioslave, too. I am using the native KDE editor, KATE. KATE has a nice syntax highlight and a rather primitive, string based autocomplete, but that's often enough -- curiously, given how Drupal uses many indirect ways to call a function, a string based autocomplete is often better than one based on actual PHP syntax. It also has a script debugger (see my blog post) which I do not use that much, my debugging needs are nicely covered with the occassional print, var_export etc. statement. Quite primitive, I know, but it works always -- by not getting accustomed to a debugger I can easily work in a terminal window over SSH with whatever editor I have access on whatever website I need to work on at the moment (I prefer nano in a terminal). Primitve tools have their own uses :)
My browser of choice is Opera, it's just faster and does not eat up resources. I might change to Firefox 3, the jury is still out there -- they claim to fix the memory leaks, we shall see. However, I already use FF as an HTTP debugger with Firebug and the Web Development Toolbar plugins.
I use bzr as the source control system for core. Again, I do not use much of its features, but as there is a big company (Canonical) behind it, the mirror (https://launchpad.net/drupal/main/) not just works rather well but I can expect it to be up for a long time -- it's now up for more than a year now. It's very easy to copy the mirror to the local machine -- and now it's very fast too, in the past it was like ten minutes, now it's about one minute to get the 8000-something revisions. The same bzr branch command lets me create as many branches as I want. I keep around a handy and simple alias (B='bzr diff --diff-options -up') which rolls my patches. If I just want to work on something quick, I do not create a separate branch, rather revert, change, roll the patch and then repeat. I only use branches when I have some patch which takes a lot of time. (This is why you sometimes see accidentally merged patches from me.)
Next up is search. The basic Unix tools are find, grep (and occassionally, cut). Another very useful tool is cscope. I keep a cscope.files in the Drupal directory listing all the .module, .inc, .php, .engine, .theme files and then cscope can quickly show me where a function is defined and where it is used.
In the miscellaneous section, the first mention goes the trusty companion of the well known SSH utility: ssh-agent, which can store you private key in memory, totally avoding typing in any passwords. Even less known is ssh-copy-id which copies your pubkey to a server in one quick step.
Another important utility is kcachegrind which tells me about slow parts of some by visualizing the output of the xdebug profiler.
As a parting shot, I recommend reading Bash tips and tricks and 10 Linux shell tricks you don’t already know if you run Linux.
More Drupal Screencasts
What is Mastering Drupal?
MasteringDrupal.com has one simple goal: help people to learn and become experts using Drupal. This site, videos, and most content on the site are produced by Growing Venture Solutions a Drupal consultancy based in Denver and New York.




Comments
Wow, chx, thanks for an
Wow, chx, thanks for an incredibly tip-filled post!
One thing that catches my attention is cscope. How do you generate cscope.files? Do you have the (find?) command that generates the list of all those files for *nix newbies, and do you have it set up to recreate the list regularly?
(Our first steps toward trying to figure this out are here.)
I like Kubuntu, but am using
I like Kubuntu, but am using Ubuntu with K-stuff on top. (Konqueror! see my description of Konqueror in midnight commander mode + vim as a light weight eclipse alternative: Konqueror and Vim 7 as IDE http://awebfactory.com.ar/node/95 )
Screenshot: http://awebfactory.com.ar/node/154
One thing I love about Ubuntu is the frequent updates (and not security fixes, but real updates on a daily/weekly basis).
For example, after one such update, yesterday, suddenly the unix command "find" had a bug. I was looking for a textfile, and did:
$ find . -name *.txt -print
and got a weird error which only went away when I did
$ find . -name '*.txt' -print
Then this morning, up pops the update icon, and find-utils are replaced, everything is normal.
Cheers,
Victor Kane
http://awebfactory.com.ar
I like your selection of
I like your selection of tools.
As an editor I can really recommend scribes.
It has the best snippet system I know, something that doesn't work very well in kate IMO.
Yes I am using find and
Yes I am using find and because Drupal changes the list of files, it's not automated. I just do
find . -name *.inc >cscope.files
find . -name *.php >>cscope.files
find . -name *.engine >>cscope.files
find . -name *.theme >>cscope.files
find . -name *.module >>cscope.files
Also I would like to thank Harry Slaughter who introduced cscope to me in a comment on my blog.
Scribes is gnome and I think I need the KDE IO slaves.
Very well written
Very good post thanks for providing this useful information
Drupal
I'm using drupal from two years and i love it
regards
I have to agree...
Linux is a great development environment, especially for web development (Firebug is awesome!). Like yourself, I had been using Opera, but now Firefox 3 is out I can't find a reason to continue with it. The performance is great. Overall, a great article and some useful links. Thank you, mate!
Great post... Speaking of
Great post... Speaking of tools, can you list some must have books that newbie developers should have on their bookshelf to create new modules.
Thanks.
Very nice article about Drupal
I have read your article and have found it to be so great that I have linked it to most of my social media sites Mybloglog, twitter, my sites, you know !!! Hope to here from you I also have your RSS Feed in google reader....
Norman Flecha
(201) 499-7572
http://www.straightalk.biz
FireFox is not a hog!
Just wanted to chime in and say Firefox has come a long way. It's no longer a resource hog, and for me outperforms all other browsers. Some of the plugins are a major help in extending the Web Browser into an actual tool.
I have just received my
I have just received my UBUNTU Server Cd's today and am going to test many of my collection's software. Perhaps all CMS have worst type of editing tools and wordpress's is the worst tool which divert me to Drupal. To be very true am not unhappy users of Drupal as compared to Wordpress. Anyhow, i appreciate your post because it is a big help for editors.
Drupal admin sucks using
Drupal admin sucks using Opera, too slow
IDEs of PHP
Drupal development under PHP, so I think almost of PHP IDEs can using to development it. WIth Firefox, also you can additional addons named Firebug for Firefox. It's can help you to re-design template and review it before you confirm anything from template.
I never write modules or plugin for drupal , then i have no skill in this case.