Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- PHP Variable Substitution Tricks


enigma1 - 8:51 am on Nov 18, 2011 (gmt 0)


This to me seems to contradict itself. If code it more manageable, how does it become harder to manage? ;)

Because you have more files, you always need others who also know the same languages is difficult to maintain and further develop. Try to search 50 files to modify some code remotely instead of 5. Check the frameworks who use template systems. Files filled with few lines of code and in some cases empty files which supposedly serve as placeholders for application expansion, user hooks which almost never used etc.

And so the smarty template as every other traditional template system adds another layer to the top of the framework. Another scripting language to learn (and why?), whether you want it or not, is going to take longer to execute, harder to find other developers who use the combination of languages you use and more difficult to port code from other open source software. And if you think you have something modular in the end you don't. You have something more convoluted.

using a well known templating framework such as Smarty allows someone who is unfamiliar with your website to come in and just start making changes.


About unfamiliar with the code now, If you really want to use a template system, it can be done via a user interface and be pretty much independent from the actual code of a framework and transparent to users and developers. Create and position the layout sections around pages with drag and drop have a graphical interface etc. Then whether developers or users use the interface is up to them. You don't add anything extra to the code this way. And so you don't force anyone to learn another scripting language, it becomes optional. The code doesn't have an extra template layer that you have to learn. The drawback is of course such an interface with the application is very specific and requires tremendous work.

Another reason you will see this type of resistance these days is because of the typical site requirements and framework details. So you need to know html, css, xml, js, php, sql, server and o/s specifics in many cases. Plus the code differences due to versions of each of those, plus the frameworks at the top of each of these languages split in different layers - that's only coding - and then you say that another layer via a template makes our life easier. It doesn't.


Thread source:: http://www.webmasterworld.com/php/4386377.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com