Stamp has certain advantages over traditional (inline) templating.
Using stamp templates you keep your HTML clean. No presentation logic is added to the HTML file. This means total separation between HTML and business logic.
Because the HTML remains untouched templates can easily be swapped or reused. This allows a more flexibile approach to designing applications and websites.
Because we do not use inline code there is no need to learn some kind of template language. Regions in templates are marked using HTML comments.
While the Stamp approach feels a bit like DOM manipulation, it's actually much easier and faster and it works for templates that do not respresent a DOM (text mails, diagrams or other structures).
Because code and HTML are separate it's a lot easier to write unit tests for Stamp templates than for conventional templates.
Painters are one-command plugins to instantly render basic frequently needed HTML structures like pulldowns or tables. They also allow to design afterwards improving RAD.
copyright © 2011 Gabor de Mooij | Stamp PHP Template Library