By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,320 Members | 2,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,320 IT Pros & Developers. It's quick & easy.

Which Template Engine?

P: n/a
Hello,

I'm looking for "Template" recomendations for PHP 4, like which one is
popular or has the best/most features.

I'm somewhat of a newbie with PHP and bacame interested in templates via
Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
website gave me the impression it was designed around php3 and maybe hasn't
been updated in a while.

I also ran across patTemplate and Smarty.

Opinions?

Thanks in advance

Don
Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
In article <A0*****************@newsread1.news.pas.earthlink. net>,
"Don Sutter" <no@way.com> wrote:
I'm looking for "Template" recomendations for PHP 4, like which one is
popular or has the best/most features.

I'm somewhat of a newbie with PHP and bacame interested in templates via
Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
website gave me the impression it was designed around php3 and maybe hasn't
been updated in a while.

I also ran across patTemplate and Smarty.

Opinions?


My opinion is that Smarty rules ... some people think there is too much
'programming'/logic going on in Smarty templates, but I think that as
long as it's logic that is solely concerned with presentation it can be
argued that it belongs in the template.

Some people also dislike the different Smarty syntax, for example:

{foreach from=$array key=key item=value}

instead of

foreach ($array as $key => $value)

But I find that it in fact helps me to keep business logic and template
logic separate.

JP

--
Sorry, <de*****@cauce.org> is een "spam trap".
E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @.
Jul 17 '05 #2

P: n/a
Don Sutter wrote:
Hello,

I'm looking for "Template" recomendations for PHP 4, like which one is
popular or has the best/most features.

I'm somewhat of a newbie with PHP and bacame interested in templates via
Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
website gave me the impression it was designed around php3 and maybe hasn't
been updated in a while.

I also ran across patTemplate and Smarty.

Opinions?


What about PHP ?-)

Else, the PEAR library has several templating systems. You may also want
to have a look at PHPTal, the PHP implementation of Zope's templates.

HTH
Bruno

Jul 17 '05 #3

P: n/a
If you want to use a templating system that is (a) not tied to PHP and (b)
governed by W3C standards then I suggest you take a look at XSL. In this
method all my PHP scripts do is output the data to an XML file then perform
an XSL Transformation using a predefined XSL stylesheet. I have made my
stylesheets reusable so that I can produce 300+ pages from just 8 XSL files.

For more details take a look at
http://www.tonymarston.co.uk/xml-xsl/index.html.

I also have a sample application which you can run online which is
documented at http://www.tonymarston.net/php-mysql...plication.html

--
Tony Marston

http://www.tonymarston.net

"Don Sutter" <no@way.com> wrote in message
news:A0*****************@newsread1.news.pas.earthl ink.net...
Hello,

I'm looking for "Template" recomendations for PHP 4, like which one is
popular or has the best/most features.

I'm somewhat of a newbie with PHP and bacame interested in templates via
Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
website gave me the impression it was designed around php3 and maybe hasn't been updated in a while.

I also ran across patTemplate and Smarty.

Opinions?

Thanks in advance

Don

Jul 17 '05 #4

P: n/a
"Don Sutter" <no@way.com> wrote in message news:<A0*****************@newsread1.news.pas.earth link.net>...
Hello,

I'm looking for "Template" recomendations for PHP 4, like which one is
popular or has the best/most features.

I'm somewhat of a newbie with PHP and bacame interested in templates via
Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
website gave me the impression it was designed around php3 and maybe hasn't
been updated in a while.

I also ran across patTemplate and Smarty.

Opinions?


Please look at the archives. The answer is totally disputed. For
example, see one of the previous discussions
<http://groups.google.com/groups?threadm=c17ndg%24l3t%241%40newsreader.mailg ate.org>

Also see:
1. http://www.phpbuilder.com/annotate/m...hp3?id=1013434
2. http://www.phpbuilder.com/annotate/m...hp3?id=1013711
3. http://www.phpbuilder.com/annotate/m...hp3?id=1013461
4. http://www.phppatterns.com/index.php...cleview/4/1/1/
5. http://www.massassi.com/php/articles/template_engines/
6. http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf

--
http://www.sendmetoindia.com - Send Me to India!
Email: rrjanbiah-at-Y!com
Jul 17 '05 #5

P: n/a
"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.com> wrote in message
news:ab**************************@posting.google.c om...
"Don Sutter" <no@way.com> wrote in message news:<A0*****************@newsread1.news.pas.earth link.net>...
Hello,

I'm looking for "Template" recomendations for PHP 4, like which one is
popular or has the best/most features.

I'm somewhat of a newbie with PHP and bacame interested in templates via
Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
website gave me the impression it was designed around php3 and maybe hasn't been updated in a while.

I also ran across patTemplate and Smarty.

Opinions?


Please look at the archives. The answer is totally disputed. For
example, see one of the previous discussions

<http://groups.google.com/groups?thre...wsreader.mailg
ate.org>
Also see:
1. http://www.phpbuilder.com/annotate/m...hp3?id=1013434
2. http://www.phpbuilder.com/annotate/m...hp3?id=1013711
3. http://www.phpbuilder.com/annotate/m...hp3?id=1013461
4. http://www.phppatterns.com/index.php...cleview/4/1/1/
5. http://www.massassi.com/php/articles/template_engines/
6. http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf

--
http://www.sendmetoindia.com - Send Me to India!
Email: rrjanbiah-at-Y!com


Very good reading there..

I agree, I write PHP using objects for everything. I don't think a template
engine will help you at all.

- Hayden
Jul 17 '05 #6

P: n/a
"Hayden Kirk" <sp**@spam.com> wrote in message news:<Wr*****************@news02.tsnz.net>...
"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.com> wrote in message
news:ab**************************@posting.google.c om... <snip> Very good reading there..

I agree, I write PHP using objects for everything. I don't think a template
engine will help you at all.


Actually, when I was forced to use the phpBB like template, I was
searching for some rational explanations to prove that was messy to my
boss. I was stopped by those sites that reflected my own ideas about
the template engines. It is nice to see many people have same opinions
on this.

I too use a kind of template system---but is totally powered by
PHP;-) <http://groups.google.com/groups?selm=abc4d8b8.0402130547.2f09d2af%40posting .google.com>

--
http://www.sendmetoindia.com - Send Me to India!
Email: rrjanbiah-at-Y!com
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.