wiki:DevelopmentTutorial

Development Tutorial

How to get started with development. Prerequisite: install OrganiK as described in the DevelopmentInstallation.

All the development best practices of drupal apply. See there for code-formatting, security, module development, etc.

Unit Testing

Please use the recommended simpletest module. Installation instructions are at DevelopmentInstallation.

Development with unit tests allows us to isolate errors, provide good log messages, and indirectly document our code.

For an introduction to unit testing, read the simpletest documentation at drupal. For running tests, go to ?q=admin/build/testing on your installation.

Adding new modules

There are two different ways to add modules to the core of OrganiK, one by copying a drupal module, the other by making a new module.

If you add an existing module from drupal and do not modify it, upload it into source:trunk/drupal/organikdrupal/sites/all/modules.

If you make a new module from scratch or plan to modify a drupal module, upload it into source:trunk/drupal/contributions/modules and modify the svn:externals property of the folder source:trunk/drupal/organikdrupal/sites/all/modules so that the contributed module is added to deployed installations.

Verify your changes by updating your development environment, all modules should end up in your lokal organikdrupal/sites/all/modules folder, both the original drupal files and the contributed modules by us.

Updating Drupal

We use a patched version of the Drupal Core and modules. That is, the original version of drupal is added to the source:trunk/organikdrupal, and then remembered as a tag in source:tags/organikdrupal. When updating drupal to a new version, the DIFF between the tagged version and the trunk has to be applied to a new drupal release.

  • Preparation: remember the version of the current trunk. Its rev:CURRENT. Find the tag which identifies from which drupal version the trunk was done. This is tags/organikdrupal/VERSION_X
  • in the trunk: replace the core modules with the new drupal version. The new trunk is now the "original drupal VERSION_X+1"
  • commit the trunk with "VERSION_X+1" and copy it to tags/organikdrupal/VERSION_X+1
  • apply a diff between the VERSION_X and rev:CURRENT of the trunk to the new trunk - all changes we have done to the original VERSION_X are now applied to VERSION_X+1
  • The new trunk is now: a new drupal with our changes applied. commit the new trunk. This is our working copy.
  • Fix bugs, test.
Last modified 7 years ago Last modified on 10/01/09 16:15:00