User Tools

Site Tools


Serval Maps Visualisation Website - System Architecture

The Serval Maps visualisation website is constructed using the PHP programming language. License information for the various components of the system is available here.

Each visualisation is contain in separate directories and while they share the majority of the same code, changes to core files have been made to accomodate the different requirements of the visualisation.

The basic folder structure is as follows:

  • webroot/ - the root of the website, including static html files
  • webroot/assets/ - assets used in the visualisation, including css files, images and javascript code
  • webroot/admin/ - root of the application component of the website
  • webroot/admin/index.php - entry point for the PHP application
  • webroot/admin/cache/ - cached and processed data used in the visualisation
  • webroot/admin/data/ - raw data files, used to construct the cached data
  • webroot/admin/libraries/ - PHP libraries used by the website, as managed using Composer
  • webroot/admin/logs/ - log files created by the website
  • webroot/admin/ServalMaps/ - the custom PHP files and classes that are used to manage the data and cache
  • webroot/admin/templates/ - static template files used to construct the admin panel

The admin section of a visualisation is built using the Slim Framework. This is a lightweight PHP framework with support for things as pretty urls and application management.

PHP Classes

The following PHP classes comprise the admin application

  • CacheManager - provides functionality to reset the cache directories.
  • DownloadManager - manages the data related to making arbitrary downloads available, such as PDF files etc.
  • ExportXFormInstance - maintains the spreadsheet that can be downloaded containing all data in the instance (completed survey) files
  • FileUtils - provides general file related utility methods
  • KmlManager - manages the construction of metadata used to access KML based GPS traces
  • MarkerIndex - creates the index data used to filter markers on the map
  • StringUtils - provides general string related utility methods
  • ValueMap - creates a map between the values recorded for an answer and their full text descriptions
  • XFormForm - manages all aspects of the creation of cached data related to the XForm definitions
  • XFormInstance - manages all aspects of the create of cached data related to completed forms

Additional information related to each class is available as code comments in the PHP file for the class

content/servalmaps/visualisation_architecture.txt · Last modified: 14/05/2013 23:18 (external edit)