02 July 2006 14:45
Expose | PHP template engine
by fredbirdExpose is a template engine written in PHP. A template is a special kind of document that describes how a page will look like. How does this differ from writing webpages/applications using ordinary PHP files? A template does not contain code to fetch data from a database or deal with forms. It only contains code how this data is transformed to HTML.
There's a lot of debate in the template world about wether one should use a template engine that uses a custom syntax (eg. Smarty) or one that uses PHP as it is (eg. PHPSavant). The first approach has the advantage of a safe environment designers work in, at the cost of reduced flexibility. The latter has the advantage of the full power of PHP, at the cost of reduced security. Expose uses both approaches. It supports (most) PHP functions and language elements while still being secure by using a tokenizer and compiler that checks the syntax and functions that are used.
Savant2 (2.4.3)
by fredbird & 1 otherSavant is a powerful but lightweight object-oriented template system for PHP.
Unlike other template systems, Savant by default does not compile your templates into PHP; instead, it uses PHP itself as its template language so you don't need to learn a new markup system.
Savant has an object-oriented system of template plugins and output filters so you can add to its behavior quickly and easily.
1
(2 marks)