Developing a Module on a Windows System

Unfortunately a lot of the writings you will find here on are geared towards Linux (or its variants). I had to pore through those writings to come up with a technique to use on Windows that works for me. Hopefully these tips will help you too.

My Environment

As of this writing, I have eight development (test) sites on my PC that reflect the live sites that I develop or do primary maintenance on. They are set up in a multisite configuration.

I do my module development in my sites/all/modules directory. This allows all the sites to be exposed to the module so I can have different environments in which to test it. This can be important because not all modules play well with each other and what works in one site may not in another.

Currently, I use Dreamweaver because I haven't had the time to learn a better IDE yet. [Please, someone step up and create a tutorial on Eclipse or something like it!] Dreamweaver is a horrible development tool for Drupal (more on it later).

Why not Use Notepad or Wordpad?

You can. I do if I'm making a quick, small change. Many years ago I abandoned Notepad so I can't speak to it's current implementation; some people say it's better.

I use Wordpad for these quick changes. However, Wordpad has a nasty habit of moving the current line (with the cursor in it) to the top of the frame when you save it; this can be annoying. It also doesn't know PHP so it doesn't color the code like an IDE (or even Dreamweaver) does.

Another disadvantage is no line numbering. Unless you never make a mistake (be honest now) and never have to refer to your Apache error log, something that tells you the line number is important for locating your errors.

I have had some people recommend UltraEdit< and NotePad2<.

BEFORE You Start Coding

Drupal is constantly being improved. This means that, at any given time, there are at least 3 versions: a) the previous stable version (as of this writing, 4.7), b) the current stable version (5), and c) the next development version (6). It is probably going to be common practice that the version beyond that (7) will be at least in planning as well.

This means it would be a really good idea for you to do a little homework. There is a handbook section on Updating your modules<. The Drupal philosophy is to not carry "baggage" forward; this means that occasionally (usually) The new changes will "break" your module. Study that plans and announcements to see if there are things you can easily avoid now.

For example, D6 will eliminate the "db_num_rows" function. I had this all over my previously developed modules. Once I became aware of this coming change, I could start coding around it. Thus I avoid one problem in upgrading.

Another good place to keep up on this stuff is the Drupal issues queue<.

Plan, plan, plan.


PHP editors

Hi Nancy, I have added your site to my bookmarks, because you have some useful info on it.

re: PHP editors. I used to use Dreamweaver exclusively, because I didn't know any better and I fell into the Macroedia/Adobe marketing propaganda. That was over a year ago now. Now I use either Eclipse PDT (all-in-one) which includes a debugger, PSPad, which has some excellent functionality including FTP and an excellent 'code explorer'. I also use notepad++ for small quick jobs.

FYI, I noticed a get 'Firefox 2' IMG on one of you pages, you may wish to update this now version 3 is available.

Be Good


I have heard lots of good things about Eclipse, but just haven't spent enough time learning it. It certainly didn't seem intuitive to me.

I have switched to Notepad++ and love it.

I'll try to locate a FF3 graphic.

PHP debugging

If you want PHP debugging then Xdebug is worth a look<. Just download the relevant version for your version of PHP. Eclipse has an Xdebug plugin built-in; Notepad++ has one availabe also, see the link on that page.

Eclipse tutorial information

You can find information on using Eclipse with Drupal at<

There is also good information on using Eclipse with Drupal at the IBM tutorial on "Using open source software to design, develop, and deploy a collaborative Web site" at<

Part 3 talks about installing Eclipse and the while LAMP stack on Windows (although I found it easier to use XAMPP) and Part 13 has lots of detail on using CVS.

Have you seen<?

Out of the free ones, my personal preference is JEdit - portable in both senses (cross-platform, runs with zero-config from a flash drive etc)

I keep meaning to set up Eclipse, but don't (yet) do enough coding. . .


I hadn't seen that. I'm now using Notepad++ pretty much exclusively. I like some of its features and it does just abut everything I need.

An IDEInteractive

An IDE that you might try is Notepadd ++.

It has built in support for all kinds of languages including php and html.

Thanks, I'll look for it

Thanks, I'll do a web search for it.