ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  The Dynamic Duo of PEAR::DB and Smarty
Subject:   No, it does not (rebutal)
Date:   2003-04-23 19:55:28
From:   jcpm
Response to: Article shows poor understanding of Smarty & pear

1. Did you read what I said about the Template_API class ? I only create it so I don't have to set all of the appropriate variables and to give me an extra taste of security in thinking that I could use the same front-end code with different templating engines.


2. I understand what you are trying to say, but the include is necessary because there will be cases where some pages / scripts in your web application will not need the template class. Instead of having to parse the Template_API class, and the Smarty classes on every page hit, putting it on a page by page basis helps in performance a little bit.


3. Please, let's not over-react here. It was just supposed to be a simple example, not a best-practice type of article. It would be a very long article if I needed to describe and show all helper functions and includes that I usually use for simple examples like the one you are talking about here.


4. Why are ideal PHP applications supposed to use the same fetchmode on every page ? I know the trick of using the setFetchMode() method but I don't want to lose the flexibility of being able to specify a different one when I need to / want to.


5. I'm totally up to speed with the latest versions of Smarty, but why is the use of {foreach} prefered over {section} ? There is no difference in functionality. I personally prefer to use {section} but as I said to the other poster, that is just a personal opinion. Similar to the use of 'foreach' or 'for' in PHP, may I say so.


Cheers,
Joao Prado Maia


1 to 1 of 1
  1. No, it does not (rebutal)
    2003-04-24 09:06:48  anonymous2 [View]

1 to 1 of 1