Entries filed under Publications

Getting started with PHP templating

Recently in Smashing Magazine I published the article about templating in the PHP:

In this article, we’ll cover how to separate the view of your PHP application from its other components. We’ll look at why using such an architecture is useful and what tools we can use to accomplish this. Here’s what we’ll cover:

  1. Learn some basic MVC concepts,
  2. Review some popular templating libraries,
  3. Play around with a small custom-made view class.
  4. Explore the basics of using the Twig library.

Click here to read the article.

Sample code for the article is available as a mercurial repository.