|
|
|
|
|
by sbarre
4688 days ago
|
|
I would actually argue that using PHP as the templating language in a PHP MVC application has become the majority use case. Why layer an additional templating language (Smarty, etc) on top of PHP - incurring extra processing and parsing - when PHP is a perfectly capable templating language itself? There are cases where you may need to do this (if you can't "trust" the templates for example and you need to enforce some kind of validations or restrictions on them) but otherwise you just need to follow/enforce business rules about what can go in your views, and just use plain ol' PHP.. |
|
From past experience: to stop shittier developers at your company putting controller logic in the templates. Using something that does nothing but templating ensures that your templates do nothing but present data.