Yes, PHP can blur the line between logic and presentation. Obviously something a lot of hardcore programmers don't like. I will say though, for me that feature has been a lifesaver at times, because it simply gives me a little more control.
However, in further discussion, applying to any web scripting language, I am not so confortable with the typical "separation of presentation and logic" argument I keep hearing. Templates are great for large websites which will have many pages of similar data outputted, for example: e-commerce websites, online product catalogues, etc... I agree that for most dynamic websites, separation of presentation and programming is the goal, but I also wonder if that approach isn't sometimes a little limiting.
My interest is in specialized web application programming and intranet software. In other words, I'm not talking about the typical e-commerce website, weblog or online product catalogue, where a templating system is of obvious benefit. Also, in the kind of work I do, there is not so much need of an "artist" or designer using a WYSIWYG editor to handle the front end, because the front end is not a web design but a GUI interface. Ergo, in this situation, the programmer is also the designer.
For example, how could I efficiently use a templated presentation system to handle cross-tabulated table output? Also, what if I need every aspect of the HTML output to be conditional, such as "only display this textbox if that record has not been updated", etc...?
I have found that for my purposes, it's much more beneficial to go the "other way" and make everything a function of programming logic (as much as possible). Just about every type of output involving a database, or anything involving forms is wrapped up into object methods. Eventually, I plan to use an O-O approuch to output all the "static" HTML for my applications. In these situations, once my library of routines is in place, I can control *everything* through programming, with no need of HTML WYSYWIG design. I have made progress in this area using PHP, but I am now researching how to do similar things with Perl. Fortunately Perl has a large library of modules that already handle similar functions.
Some may say this will place unnecessary processing loads on the server, since all output will be parsed. I say that in return for speed of coding applications, I will take the trade-off. (this is also another plus for PHP, by the way, because with
products you can pre-compile and cache your code for more efficiency).
Any thoughts on these ramblings ;-)?