[Bio] / SeedViewer / README Repository:
ViewVC logotype

View of /SeedViewer/README

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (annotate)
Mon Nov 14 21:42:36 2011 UTC (7 years, 11 months ago) by olson
Branch: MAIN
CVS Tags: rast_rel_2014_0912, rast_rel_2014_0729, mgrast_release_3_1_2, mgrast_version_3_2, mgrast_dev_12152011, HEAD
Script & infrastructure for creating easy seedviewer pages.

Simple Portable Seedviewer Pages

We wish to make it easy to create new SeedViewer pages in a way that
development may be performed in standard CGI pages or in plain perl
scripts (to enable debugging or profiling).

The Guts of the Application
---------------------------

In order to do this the code that performs the actual web-page
rendering and request processing must be moved to a standalone module
that resides in FigKernelPackages. This module must define a single
function:

  run($fig, $cgi, $sapObject, $user, $my_url, $hidden_form_var)

The invoking code (SeedViewer or standalone CGI script) will pass or
construct the arguments appropriately. They are:

  $fig	      	     A FIG object
  $cgi	      	     A CGI.pm instance initialized with the request parameters
    	      	     for the web request being processed.
  $sapObject  	     A SAPserver object.
  $my_url     	     The URL to use to refer to the this web page.
  $hidden_form_var   If web forms are constructed, the data in this
  		     parameter must be included inside the form.

A sample module that performs the simple operation of displaying the
function of a peg may be found in FigKernelPackages/BlankSVP.pm.

The SeedViewer Page
-------------------

For the application to appear in the seedviewer, a module must be
placed in the directory SeedViewer/WebPage. This module contains some
standard boilerplate plus the invocation of the module we defined
above. 

The URL to this page is constructed using the name of the module in
SeedViewer/WebPage:

  http://<your-base-seed-name>/seedviewer.cgi?page=ModuleName

A sample module for our example may be found in
SeedViewer/WebPage/BlankSVPPage.pm. The corresponding URL in the
pubseed would be

  http://pubseed.theseed.org/seedviewer.cgi?page=BlankSVPPage

If you are using a sandbox in your home directory, the corresponding
URL would be

  http://bioseed.mcs.anl.gov/~username/FIG/seedviewer.cgi?page=BlankSVPPage

The CGI script
--------------

To make the code available via CGI some simple boilerplate must be
placed in the directory FigWebServices. 

A sample CGI for this example may be found in
FigWebServices/blank_svp.cgi.

Automating everything
---------------------

In order to make the creation of new pages as simple as possible, we
provide a script that will generate the boilerplate pages as described
above.

To use it, one must specify the names of the three files ("guts"
module, SeedViewer page, cgi script). For example:

  create-new-page MyNewScript.pm MyNewScriptPage.pm my_new_script.cgi


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3