Skip to content

VWCV site dev guide

The site is not a content management system, it is not even a fully dynamic site. Any content updates require technical changes. This section of Doclab provides the context for that.

The VWCV site was inherited from a previous agency in early 2009. The way the site is architected poses a number of challenges when applying updates or changes. Chief amongst these is that the main business operation of the site – ongoing content updates and changes – is not addressed by the solution delivered.

The entire site needs to be rebuilt to make it suitable for purpose. However, in the meantime we must operate the existing platform. This guide provides technical information to help in that. It is designed for technical developers wworking on the site and that have a background in:

  • PHP
  • SQL
  • HTML / CSS

The application is PHP based and uses the fusebox framework. It is hosted across several environments for staging and production. These sit on Windows and Redhat, with RDBMS across SQL Server and MySQL.

Fusebox is a PHP framework based on the Front Controller pattern. Fusebox was originally developed for Coldfusion and PHP and is so-called as it emulates the way electrical systems work in buildings. I.e., a fusebox distributing power via various circuits. Fusebox has the concepts of circuits and actions. Fusebox has since been ported over to several other technologies including ASP.

This pattern can be thought of in terms of an office building. An order request arrives to a reception area and is rooted to one of several rooms. The order is packed then sent out via reception to the address it was sent from.

A circuit is a set of related functionalities. A circuit usually maps to a subdirectory and contains fuses.

Also known as a fuseaction, an action is a method or function within a circuit.

A fuse is a small file responsible for performing a simple action

[diagram pending]

Incoming URLs contain two main variables: these are circuit and action. For example: ../a/b will be rewritten as …action=b.a This is then accessible within the system as:

$Fusebox['circuit'] and $Fusebox['action']

An inbound URL is processed in the following way:

fusebox url processing diagram

  1. Convert URL to required format
  2. Look up the required circuit using fbx_circuits.php
  3. Navigate to the subfolder for that circuit
  4. Resolve actions to the correct parts of the circuit using fbx_switch.php
  5. fbx_switch.php will determine what actions to take and the resources required

RewriteRule ^external/send-brochure/([a-zA-Z0-
9_]+)/title/(.*)/name/(.*)/surname/(.*)/emailstatus/([a-zAZ0-
9_]+)/email/(.*)?$ index.php?action=external.sendbrochure&
brochure=$1&title=$2&name=$3&surname=$4&emailstatu
s=$5&email=$6 [L]

The hosting environment is standard for low-mid level traffic. It consists of production, staging, integration test, and development. Production, staging, and integration tests are mirrored in VWCV and iris infrastructures.

vwcv hosting environment