My Wiki!

FOSD Django-productline

Goal

A typical django web application consists of the following:

web server configuration of some sort
a set of external services
databases
application code
templates
javascript code
CSS

The goal is to be able to automatically compose entire applications i.e. all required artefacts out of a set of features. In the context of “automatical composition”, project-individual integration code must eliminated. Multiple applications can then share common features and differ in others. Generated applications need to be easy to manage over the rest of their product lifecycle(further development, deployment). Also, there needs to be support for managing the products individual configurations e.g. webserver and database configuration. Composition Mechanisms To be able to compose the required artefacts for a product, django-productline makes use of multiple composition mechanisms: Python code is composed using featuremonkey djangos built in composition mechanisms

      for templates(django.template.loaders.app_directories.Loader)
      and static files (django.contrib.staticfiles.finders.AppDirectoriesFinder)
  Templates are refined using django-overextends
  Javascript can be composed using featuremonkey.js
  CSS is composable by simple concatenation.

Installation

First, make sure virtualenv is installed. On Debian/Ubuntu you can install it like so:

sudo apt-get install python-virtualenv

Then, create a new ape container environment and install django-productline and all dependencies:

wget -O - https://raw.github.com/henzk/django-productline/master/bin/install.py | python - webapps

For the development version, use:

wget -O - https://raw.github.com/henzk/django-productline/master/bin/install.py | python - --dev webapps

This will create a new folder called webapps with the following structure:

webapps/
    _ape/
        venv/
        activape

<WRAP center round info 100%> this is a completely self contained installation. To get rid of everything or to start over, simply delete the webapps folder. </WRAP>

Congratulations, the installation is now complete!

SPL (software product line) containers can now be placed into the webapps directory. Folder venv contains a virtualenv that is isolated from the system (created with the –no-site-packages option - default). ape and its dependencies have been installed there. If you want to use system packages, either recreate the virtualenv without the –system-site-packages option and install ape into it or put the system packages back on sys.path using softlinks, .pth files, or path hacking.

Working with APE

To activate container mode

Change into the webapps directory and issue the following commands:

$ . _ape/activape

Under the hood, this takes care of setting some environment variables and activating the virtualenv.

tbd


Navigation