Timber & Twig

Timber & Twig

What is Twig?

Basically, Twig is a template language for PHP. Twig gives you a compact and easy to read/understand syntax. The problem is PHP really was never meant to be a template language.

Other Content Management System, such as Drupal and Laravel, have decided to use Symphony, which utilizes the Twig Template engine. Twig allows developers to write custom templates (such as Timber-Boot) better, using more efficient code which is easier to maintain.

What is Timber?

Timber is the plugin the integrates WordPress with Twig. This way PHP in WordPress concentrates on delivering the data and logic. The is what WordPress is best at. Let Twig do the display and HTML.

That means that Timber-Boot can use patterns that are object-oriented, and that adhere to the DRY (Don’t Repeat Yourself) and MVC (Model-View-Controller)principles.

Optimized for Speed: Twig compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code was reduced to the very minimum. Both Timber and Twig have a powerful built in cache system that improves performance and speed.  We have integrated this control into the PW.A Cache.

Affordability: Using object-oriented patterns, makes customizing a breeze as most of the code already written can be used.