Skrol 29 wrote:
I just can't work with PHP the usual way.
Mixing business source and interface source is something too bastard for me.
Now that I know templates systems I totaly disagree to say that PHP is a
Template Engine. Ok, it has some basic template features, but they are too
poor to use it this way seriously.
Mattias Thorslund wrote:
Who says PHP itself is a template engine? I think nobody.
Rasmus Lerdorf wrote:
I do.
[...] The approach I tend to point people at is something I have been calling
a Template API. That is, when you build your application, you create a template api to go along with it. In essence you are creating a templating system for each application you write.
While the Template API approach you're describing is a good solution for developing applications with Php and while it does separate business logic from design logic in some way, I would call it a modularized system rather than template system. In your example, the application organisation is templated, but the design is not nicely templated.
This has probably something to do with what we expect a Template System to be. I think a good Template System for PHP should enable us to work the way we work with L4G/RAD tools. That is: - build and update the design with a WYSIWYG tool, - change the makeup of the design without coding, - change the position of the displayed data without coding, - not touch design source from the code.
This way, business logic and design logic stay linked only by technical entities chosen to display sets of data (listbox, checkbox, table,...).
It's possible to have such a Template Engine; there is no technical reason to not have it. It's just that the first generation of PHP Template Engines missed that.
I'd like to have such a Template Engine not because I have no control over the people creating templates, but most of all because that's a very comfortable way to conceptualize and manipulate an application in edit mode.
--------------------- Skrol29 www.tinybutstrong.com ---------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php