<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1036216" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1036216</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/smarty-templates-classifieds-software#comment-1208629</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;JeevesBond;208603 wrote:&lt;/strong&gt; What alternatives are there to Smarty Abhi? I know about phptemplate, but that only works for Drupal (?).&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I don&#039;t think you need an alternative package as such.  You can put the template idea to practice with an appropriate system architecture in your application.  Which to a large extent amounts to avoiding directly calling business routines or writing data from the template.&lt;/p&gt;
&lt;p&gt;A Model-View-Controller approach often works out reasonably well.  Have a look at Rasmus Lerdorf&#039;s toy &lt;a href=&quot;http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html&quot; class=&quot;bb-url&quot;&gt;no-framework PHP MVC framework&lt;/a&gt;, a neat example of keeping it simple. While I don&#039;t wholly like Marston&#039;s version of PHP MVC that I linked to in the last post (it&#039;s kind of large), it also shows the same basic point that Lerdorf&#039;s does:&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;Rasmus Lerdorf wrote:&lt;/strong&gt; Nothing is going to build your application for you, no matter what it promises. ... In the end I think you will find that your homegrown small framework has saved you time and aggravation and you end up with a better product.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;In practice, all this matters only for web applications that aren&#039;t maintainable without a separate presentation system.  Smaller sites can frequently get away with far less effort expended in architecture.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;(... as far as PHP goes, anyway.)&lt;/p&gt;
 </description>
     <pubDate>Sat, 14 Oct 2006 05:37:55 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1208629 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/smarty-templates-classifieds-software#comment-1208603</link>
    <description> &lt;p&gt;Have to agree with Abhi here. In plain,  non-software engineering terms: it&#039;s overcomplicated. By the time you&#039;ve learnt how to use Smarty you might as well have just written everything in PHP.&lt;/p&gt;
&lt;p&gt;What alternatives are there to Smarty Abhi? I know about phptemplate, but that only works for Drupal (?).&lt;/p&gt;
 </description>
     <pubDate>Fri, 13 Oct 2006 16:19:47 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1208603 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/smarty-templates-classifieds-software#comment-1208595</link>
    <description> &lt;p&gt;I&#039;m afraid I&#039;m not much of a Smarty fan... &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Yes, there are pitfalls.  Smarty itself falls into a trap of reinventing wheels that, I think, domain-specific languages often do.&lt;/p&gt;
&lt;p&gt;The motivation for Smarty is fine: to separate application and presentation.  However, I don&#039;t see how that implies reimplementing a whole language -- albeit a restricted (but growing!) one.&lt;/p&gt;
&lt;p&gt;To cope with presentation logic, Smarty has reimplemented control structures like conditional branching, looping and so on, which belong to a general-purpose language.  In this case that language is PHP, already at hand where Smarty is.  Therefore Smarty becomes redundant, and adds unnecessary complication.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;PHP can be used for both application and presentation logic, even to make templates.  Along with otherwise good systems architecture, one merely needs to keep business logic out of the presentation layer, which requires a little discipline.&lt;/p&gt;
&lt;p&gt;Ironically, even Smarty has the same challenge:&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: This doesn&#039;t mean that Smarty prevents you from putting application logic in the template, you have to have a bit of self discipline.&lt;br /&gt;
&lt;a href=&quot;http://smarty.php.net/whyuse.php&quot; class=&quot;bb-url&quot;&gt;http://smarty.php.net/whyuse.php&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I think all the benefits of Smarty are consequent to the general good practices that it encourages; and not a result of ingenuity in the Smarty implementation itself.  As well as PHP, even XML/XSLT -- if you are so inclined -- can be used in a &lt;a href=&quot;http://www.tonymarston.net/php-mysql/model-view-controller.html&quot; class=&quot;bb-url&quot;&gt;three-tier MVC-like approach&lt;/a&gt;, for instance.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;One example of a simpler presentation layer that doesn&#039;t reinvent the wheel is &lt;a href=&quot;http://drupal.org/phptemplate&quot; class=&quot;bb-url&quot;&gt;phptemplate&lt;/a&gt; for Drupal.  While I admit that a presentation language &lt;em&gt;embedded&lt;/em&gt; -- rather than only &lt;em&gt;implemented&lt;/em&gt; -- in PHP would be preferable even to phptemplate, that wouldn&#039;t be a realistic expectation given PHP&#039;s limitations.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;So Smarty is a great idea, but I wouldn&#039;t use Smarty to practise it.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 13 Oct 2006 12:29:01 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1208595 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
