general question about smarty

From: Date: Wed, 23 May 2001 13:16:14 +0000
Subject: general question about smarty
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-786@lists.php.net to get a copy of this message
i am not too familiar with the smarty template mananger, but i was reading the documentation and using it a bit i still have a general question: i was thinking of using smarty, since everybody was so excited about using it and some say it quite increased their productivity. well, i want that too. but here is my question: what are the advantages of using smarty besides - being independent from the output format (html, xml, ...) - calling a template from the code instead of including code in the html - building a webpage out of many "template pieces" my concerns simply are 1. Is it a standard, that i can also use when i switch to another language, such as java (jsp, python, ...), or is there a standard coming up? 2. Why should i learn a new "scripting language", if i can also use PHP instead of the smarty language. Just to replace the "<?php ?>" by "{}"? 3. Why is it better to use "{SMARTY_VARIABLE}" instead of "<?php print($variabelName) ?>", if i still am limited to use php behind, because smarty only runs on php, or am i wrong? 4. If i extract my php code into classes an a website mainly only has a call to one of the classes methods, which gives the result, that only has to be printed in the right place of the website i have seperated my code from the layout too, what advatage does smarty give me here. example: ------------using php---------------- <?php $res = $myClass->myGetMethod( $someId ); ?> some html here <?php print($res["valueName"]) ?> or may be like this <?php print($res->valueName) ?> and some more html here ---------------------------- ------------using smarty---------------- some html here {RES_VALUENAME} or may be like this {RES_VALUENAME} and some more html here ---------------------------- ok, last one looks nicer in the code, but good syntax coloring helps out too 5. is the webdesigner really free from seeing source code, if he now gets to see another scripting language instead of php, the smarty language? i am JUST trying to find the advantages of why i should use smarty, and i would like to get the hints from you, who use it and have experience, i want to increase my productivity too :-) thanks for the patience, if you have read that Wolfram Kriesing

« previous php.smarty.general (#786) next »