Solprovider Lenya Kongregate Registration for Free Flash Games and Chat with solprovider


Flow allows easy use of web forms where:
1. Fields are defined in XML, including basic validation.
2. Presentation is defined in XML.
3. Processing is controlled by JavaScript.

The bad side is Flow is not i18n-aware. Visitor language information is neither in the URL nor in the stored information. This means the easy validation is useless on multi-langauge websites. See Fixing Language in Flow for the fix.


Choose to use publication-sitemap.xmap, a Usecase, or another XMAP.

I do not recommend using publication-sitemap.xmap. The default file is already messy. Flow requires several MATCHes, so putting them in a separate file is great for maintenance. You could create and load another XMAP, but Lenya already provides the ability to add XMAPs through the Usecase functionality. This requires adding "lenya.usecase=usecaseName" to the URL parameters, but that is cleaner than using URL matching such as special extensions.

The XMAP file must be in the {pub} directory. In Lenya 1.4, it may be possible to start directly from the sitemap.xmap file in the module.

Other files

Three other types of files are used with Flow:
- Fields definitions XML
- Presentation definition XML
- JavaScript code for processing

It is possible to use Flow with only the JavaScript code. If the Flow is activated, something happens. That is good for testing, but Flow is meant for taking actions based on visitor input, which requires the Fields and Presentation files.

The Cocoon standards expect:
- the XML files to be in a directory named {pub}/forms
- the JavaScript to be in a directory named {pub}/flow

This feels wrong to me. During development, you will be bouncing between these two directories. For maintenance, all the files for different Flow functions are mixed together. It is much better to create a directory under {pub}/flow for each function. All the Flow functions are organized together, and each function has its own directory for easy maintenance. Put all the files except the XMAP in that directory.

For my publication, I have:
{pub}/flow/session (for replacing the standard login)
{pub}/flow/contact (for the "Contact Us" page)

UPDATE: Lenya1.4 suggests putting the subdirectories under "modules" rather than "flow".

Another advantage of this is you can use the same filenames for each function. The standard filenames are:

With separate directories, each directory can have:

<< ContentsSetup >>

Contact Solprovider
Paul Ercolino