Wandervogel Sub-System

Version 1.1

Last Release: 08.06.2008

Website Updated: 08.06.2008

Download Wandervogel Sub-System
Change Log

Introduction

This is the home of the Wandervogel sub system. Wandervogel is a set of tools to help developers create maintainable projects.

Purpose

Wandervogel's major feature is its ability to work with database tables as if they were objects that you can manipulate with PHP. Wandervogel supports any database that is supported by PDO or ODBC. I have tested this system with MySQL (native driver), MSSQL (native driver), and Pervasive (ODBC driver). The connection string for an ODBC driver may need to be slightly massaged. I'll provide as many examples in the near future to help you get up and running in as little time as possible.

Wandervogel was built with modularity in mind. It should just "work" in any environment without conflict. I've had success installing this platform in two production environments -- both were installed and ready for use within an hour with little setup (and no configuration). The most time consuming piece of integrating this project into any infrastructure is the migration of using Record objects and removing the SQL code from your project (where it makes sense of course!). But it's well worth it!

Lastly, this project is well documented. Opening any one of the class files should reveal quite a bit of information as to the internal workings, why I chose to design the interfaces the way I did, as well as improvements I would eventually like to see happen.

Here is the main feature set:

Getting Started

What you will need

Installing

  1. Unzip Wandervogel project files to any directory
  2. Put the /base directory in any location on your hard-drive. (Generally behind your public htdocs folder)
  3. Put /wandervogel_client directory in your htdocs directory

No configuration is necessary to use the Wandervogel sub-system. It is aware of itself as soon as you include the Wandervogel class located in /base/wandervogel.php

Next:
  1. Redirect to the virtual host you created for the wandervogel client
  2. Create a new project
  3. Follow the steps to create a project

Using Wandervogel

To use the Wandervogel sub-system first you need a SQL file that contains all table schema that will be used in your project. If you already have a project then you most likely already have a SQL file containing the table schema for your project. You may either use your own table schema or the one below to test the system.

Make sure the SQL schema file is the same name as the database!

Wandervogel does not support all column types for every database engine. To find supported types look in file base/project/SchemaTranslator.php and find the variable declaration for $columnTypeMap to determine which types are supported. Also, this program currently is capable of translating MySQL, MSSQL, and Pervasive SQL files. It should be able to translate most SQL used for different engines -- but may lack the ability to identify features specific to them.

your_sql_database_name.sql:
CREATE TABLE projects (
    id              INT         UNSIGNED NOT NULL AUTO_INCREMENT,
    date_created    TIMESTAMP   NOT NULL DEFAULT NOW(),
    name            VARCHAR(32) NOT NULL,

    PRIMARY KEY (id)
) ENGINE=InnoDB;

Project Setup

  1. Create a name for your project
  2. Supply a SQL file which will be used to convert SQL tables into PHP objects
  3. Project setup
    1. Select SQL file which PHP objects will be created from
    2. Select the plug-ins to use for your projects
    3. Select the coding style of your project
  4. Review objects to create
  5. Create files

Test Project

Create a file anywhere on your system that Apache serves pages from (Generally your htdocs directory).

new_file.php
<\?php

require_once('/path/to/wandervogel.php');

wandervogel::boot('your_project_name');

// To create a new project record
$project = new Project();
$project->name = 'Upstart Illustration';
$project->save();

// To load a project record
$project = new Project();
$project->id = 1;
$project->load();

// To update a project record
$project->name = 'Upstart Illustration 2';
$project->save();

// To delete a project record
$project->delete();

?>