|
Comments for: babao20020907
| Message # 1016688: |
|
Date: 06/08/03 16:19
By: Hobbit Subject: RE: Templates are DEAD! Long live PHP! Templates are silly in uses such as this. You waste performance time and go through having to invent/learn another language for no reason. The designer argument is ridiculous. Designers are not stupid. If you give them a few snippets of what is commonly used and tell them where to use it, they'll pick up on it. Get your processing done in the top of the file (or a header better) and provide the variables/arrays for the HTML page. If your designer can't remember how to set up a foreach loop, and/or do a php echo of a variable or array variable...give him/her a reference. It's not that complicated. Here is what your designer needs to do 100% of what these templating systems buy you: 1) RENDERING A VARIABLE <?= $title ?> 2) RENDERING AN ARRAY <? foreach ($userNamesArray as $username) { ?> <td><?=$username?></td> <? } ?> 1) RENDERING A 2D ARRAY (AS FROM A DB) <? foreach ($usersArray as $user) { ?> <td><?=$thing["username"]?></td> <? } ?> That's it! And you know what? Other than the variable names (which you have to give them, template system or no...) THESE NEVER CHANGE. You can even give them a reference sheet! This can be learned in one sitting! They don't even need to know why/how it works...just that that's how it is done. And after doing it for about a week...they'll know it off the top of their head. Designers are not mongoloids, and php is not that difficult to understand. Any webdesigner that is resistant to learning a LITTLE bit about a technology that would give them a broader skillset should be replaced with someone with a little ambition. If they can't learn that little list I gave you...it's going to be hell getting them to learn a templating system that isn't all that familiar to you yourself. |
Previous Message | Next Message |


