The Template mechanism

As you will see in a moment, SWF's mechanism for generating webpages is pretty simple. It relies on template-files that already provide all the functionality for the webpages. Actually most of the time only variables in the template-files are set by SWF.

When the user clicks the Generate Webpages-Button, SWF reads the so-called template files. String patterns of the form /*[[PATTERN]]*/ are expanded during this process. Next the changed file is written to the output directory from memory. This simple transformation mechanism is true for the templatefile named index.php. For the other template-files it is a bit more complex since for each view one transformation is performed.

As a consequence the template files do not only provide the design of the generated webpages but also all of its functionality.