Website:Application overview

From WormBaseWiki
Jump to navigationJump to search

Directory Structure

-rw-rw-r--    Changes
-rw-rw-r--    Makefile.PL
-rw-rw-r--    README
drwxrwxr-x    build
  Staging directory for building third party libraries.  Current releases should be symlinked to the correct unpacked source.

drwxrwxr-x    conf
  Application and third-party library configuration.

drwxrwxr-x    design
  Design elements and ideas.

drwxrwxr-x    extlib
  Directory containing builds of third party libraries.

drwxrwxr-x    lib
  The core application modules.

drwxrwxr-x    logs
drwxrwxr-x    private
  Docs and presentations.

drwxrwxr-x   root
  /root contains static files and templates.

drwxrwxr-x   script
  Helper scripts and the stand-alone server.

drwxrwxr-x   sql
  SQL statements for various databases.

drwxrwxr-x   src
  Third party sources.

drwxrwxr-x   t
  Application test suite.

-rw-rw-rw-  wormbase.yml
  Application-wide default configurations.

-rw-rw-r--   wormbase_local.yml.template
  Template for local configuration.  Entries here will override defaults.


Catalyst offers a powerful configuration system. We use it to provide application-wide, per-page, and per-session configuration. In addition, local configuration files can be used to override any configuration option for production or development deployment.

Here, $ROOT refers to the document root of your application.


This file contains the default configuration for the application. The application defaults to using remote data sources. If you would like to override this, see wormbase_local.yml.


Move this template file to wormbase_local.yml and edit values to locally override the default configuration variables. This file is maintainted in SVN as a template so that individual development preferences are not obliterated by an inadvertent svn commit.

Application structure

The general structure of the application mirrors the organization in Acedb. Separate Model::* packages correspond to classes in Acedb.


Generic Model methods


Generic Controller Actions



Widgets are distinct presentation elements of a given model. Widgets correspond to sections in the previous WormBase site. For example, the Gene page has widgets for Identification, Location, and so on.

Specifying configuration

Required Controller actions

Required Model methods


Creating new Models and Controllers

1. Create your new Model or Controller using the script. This script provides stub formatting, documentation, and test files.

$ROOT/scripts/ model Test


[todd@micos trunk:23]$ ./script/ model Test
exists "/Users/todd/projects/wormbase/website/trunk/script/../lib/WormBase/Model"
exists "/Users/todd/projects/wormbase/website/trunk/script/../t"
created "/Users/todd/projects/wormbase/website/trunk/script/../lib/WormBase/Model/"
created "/Users/todd/projects/wormbase/website/trunk/script/../t/model_Test.t"

2. Add the new files to the SVN repository

svn add lib/WormBase/Model/ t/model_Test.t
svn commit lib/WormBase/Model/ t/model_Test.t