no-framework-tutorial/9-templating.md
2014-10-08 19:08:26 +02:00

849 B

<< previous

Templating

A template engine is not necessary with PHP because the language itself can take care of that. But it can make things like escaping values easier. They also make it easier to draw a clear line between your application logic and the template files which should only put your variables into the HTML code.

A good quick read on this is ircmaxell on templating.

For this tutorial we will use a PHP implementation of Mustache.

Other well known alternatives would be Twig or Smarty, but they are both pretty bloated and offer too much functionality for just a template engine.

to be continued...

<< previous