The concept of View Engines
The implementation of the MVC pattern in Stubbles was created with the possibility in mind to let the user choose the template engine of his choice, and not to be forced to the template engine selected by the creators of Stubbles. However, the term "template engine" is a bit outdated and often misused, that is why we call the part which creates the view of the application simply "view engine".
Stubbles itself delivers with three different view engines:
- Rasmus Template Engine?, which allows to mix HTML and PHP together in one file. Sometimes this is just the best for fast results or very simple sites.
- Memphis View Engine: This one is a PHP5 reimplementation of the ucuo Framework using patTemplate as base for rendering the view.
- XML/XSL view engine: Inspired by the Java framework Pustefix this view engine creates the view by applying XSL style sheets on a XML tree created by the application.
As already explained above it is possible to plug in your own favourite template engine. To achieve this you just need to create your own processor, because it is the responsibility of the processor to create the view engine to use, to deliver the required informations to it and to grab the created view from it and put it into the response.
