My development environment so far

Intro

These are my notes when doing my first (drupal) presentation @ FrOSCon 2008 Drupal Room This method uses the concepts
  1. All drupal sites in directory www
  2. All site-config in a separate directory
  3. All site-data in a separate directory
This way an upgrade to another drupal version runs smoothly. Hmmm this was about developer environment.

Add new local domain

Why do I need this? To make sites like http://nf.test http://nf.dev or http://froscon.demo sudo su - echo 127.0.0.254 froscon.demo >> /etc/hosts

module dependency management

I don't like the idea that dependencies are not handled in a unified way. By that I mean that both module.inc and update.php code is written to handle module status. There should be a central library handling their dependencies. When we handle this in a unified way installing a big project like ubercart is easy.

When installing/enabling a module it is important to know what this module is dependent of. Ie uc_cart is dependent of uc_order. See ie http://build2be.com/sites/build2be.com/files/ubercart.neato.png

Module management in Drupal

The title of this page should be project management because Drupal uses projects for delivering modules. A companion video shows the Drupal 5.x situation. Using drush, my drush_mm patch and update status to manage and install modules command line. This video shows better dependency checking than currently available in D7. As I hope is clear I want to contribute to implement this into D7.

Configuring ubercart

So you want to have a shopping cart. With drush_mm it's a snap.

drush --verbose mm enable uc_cart

Using verbose output this shows

Given module names: 'uc_cart'
The following modules will be enabled: 'tapir, uc_store, token, workflow_ng, ubrowser, uc_order, uc_product, uc_cart'
Installing modules
Enabling (and mayby installing) module: tapir
Enabling (and mayby installing) module: uc_store
Enabling (and mayby installing) module: token
Enabling (and mayby installing) module: workflow_ng
Enabling (and mayby installing) module: ubrowser

Installing ubercart through drush pm and mm

It's quite neat using drush to install ubercart. Here is what I did.

Preparation

  1. Install drupal 5.x
  2. Install your site/database
  3. download and install drush
  4. download and install update_status
  5. if you want to follow along install this patch for the module manager
  6. Enable the above modules. For a list see below.

Installing