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

    A node as an editable block

    I want to create a edit node into a block with ajax submit.

    I wanted to try panels 2 minipanel with a node%/edit override together. But some hour later ... nothing found yet.

    This raw view may be handy: http://drupal.org/node/48816

    But why not using some php? Below is a raw version


    <?php
    global $user;

    $sql = "select nid from {node} where uid == %d";
    $result = db_query( db_rewrite_sql( $sql), $user->uid);
    $row = db_fetch_array( $result);

    if( isset( $row) && isset( $row['nid']){
    $node = node_load( 30);
    print drupal_get_form($node->type .'_node_form', $node);
    }

    graphviz or hypergraph

    Dependency graph
    When making these images about modules i use graphviz to render them. But just ran into http://drupal.org/project/hypergraph which looks great. So I have to study this one! Commands to render a .dot file are ie with non overlapping nodes
    neato -Goverlap=false -o my.neato.png -T png my.dot
    or for a top down graph.
    dot -T png -o my.dot.png my.dot
    The attached image is an installation with the jstools, cck, views, drush, og in order to get faster user experiences. View the full image

    Questions, Quizes and Answers

    For interviewing or interogating people it is nice to have a prepared list of questions. What module to use?

    I know of these modules.
    - http://drupal.org/project/answer
    - http://drupal.org/project/quiz
    - http://drupal.org/project/webform

    In search of modules for faster user experience

    What modules does one need to get faster user experience? This probably leads to using ajax.

    One of my thought is some node/%/edit's one one page. Preferably on tabs too!

    Just browsing the categories http://drupal.org/project/Modules/category/101 (javascript utilities) and content at http://drupal.org is still overwhelming.

    Here is a listing with just some modules.
    - http://drupal.org/project/ajaxtable
    - http://drupal.org/project/autosave
    - http://drupal.org/project/block_refresh
    - http://drupal.org/project/compact_forms
    - http://drupal.org/project/cck_fieldgroup_tabs

    My drush usage

    Using drush with a strict server design makes my drupal maintence much more relaxed. I have this tiny script as a runner for drush.

    $ cat drush

    Payment Methods

    With a shop at hand one needs to get payed.

    There are a lot of payment methods and payment gateways.

    This page is not about completeness but about making notes about

    Payment methods

    I for now need Direct Payment within ubercart.