| « Status of PHP 5 | Cacheing built into PHP? » |
Rasmus on templating engines
16.11.05
Rasmus on templating engines
At PHP Forum, Rasmus said this about the "templating engine question coming back every year":
PHP *is* a templating engine by itself. Adding another templating engine on top of it just doesn't make sense. The only situation where it makes sense, is when you don't trust the template to contain nice behaving code.
I so much agree...
Of course, in b2evo, you can't always trust the template/skin... so we'll need to implement some kind of templating... but we're really gonna make it lightweight!
9 comments
I so much agree...
2005-11-16 @ 23:28
Also, templating engine is needed when you must solve some specific problems in a shortest possible time.
2005-11-19 @ 02:21
What's the problem with the template creator only using a "small subset of commands" of PHP? Are template creators genetically unable to type <?php and they have to type something else like %% instead?For the rest, I won't even argue. I didn't say that templates are useless, I said that you don't need yet another language for them. (Actually I *did* say that templates are oftentimes a bad idea, but that's another story...)
2005-11-21 @ 14:07
I don't think, that all template are genetically deviated species. But difference between php and template engines isn't in opening and closing tags, am I right? They are implementing different conceptions of coding.
As a programmer, I think, that you are right, and use of PHP is more efficient, than use of any php-based TE. But, sometimes, template engine is more convenient way - for me, and for maintainer of my product (website). IMHO.
2005-11-21 @ 14:45
2005-11-21 @ 14:47
I don't think you are right, precisely! The only real difference between PHP and template engines *is* syntax! (opening/closing tags and a few other details). Once again, the only benefit of a templating *engine* (not talking about templates altogether here) is to filter out harmful PHP features if you don't trust the template author, which should not be the case if *you* are the author.
2005-11-21 @ 14:59
2005-11-21 @ 15:15
yeah yeah yeah ... a zillion arguments for properly structuring your PHP and still only one for template engines: when you don't trust the template...(PS: I have nothing against using a cacheing mechanism -- But that's yer another off-topic suggestion -- I just don't think you need to wrap your cacheing into a templating engine.)
2005-11-21 @ 18:23