News

[17/Sep/2009:19:20] Release 0.5 includes Open Flash Chart support.

[01/Jul/2009:10:50] Repoze.who authentication tutorial added

[22/Jun/2009:11:36] AJAX calculator tutorial added.

[01/May/2009:14:15] MVC/SQL based wiki tutorial added.



Contact Email:



view source
W1000_1100.
configuration.
whiff



Download instructions
at whiff.sourceforge.net
project page
.
WHIFF DOCUMENTION

Application Configuration

A whiff application, middleware or application fragment is identified by a Uniform Resource Locator (URL) which generally also trivially identifies the Python code or the configuration template which describes the application component.

WHIFF applications are deployed as files in file system hierarchies and the URL identifying an application is closely related to the location of the file in the file system. Furthermore references between configuration files and applications observe familiar file path reference conventions.

For example consider the following configuration template ~/resume/register.whiff taken from the resume wizard tutorial

{{env whiff.content_type: "text/html",
      whiff.parse_cgi: true
 /}}
{{include "whiff_middleware/session"}}
        {{include "whiff_middleware/newProfile"}}
                {{using user}} {{get-cgi user/}} {{/using}}
                {{using password}} {{get-cgi password/}} {{/using}}
                {{using password2}} {{get-cgi password2/}} {{/using}}
                {{using page}} {{include "main"/}} {{/using}}
                {{using elsePage}} {{include "registerform"/}} {{/using}}
        {{/include}}
{{/include}}
This template essentially attempts to create a new profile using submitted user and password information and on success returns the main page, or on failure returns to the registerform page.

The register template refers to 4 other applications. The location of the implementation of each of the applications can be easily determined from the names used in the configuration file

By using a simple correspondence between HTTP URLs, Python module paths, and file system paths, WHIFF makes the process of constructing and understanding complex web applications easier.
0 comments.
Care to comment?
name: (required)
- email (not published):
comment: (required)

<< security number? >>