473,612 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Which Template Engine?

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
6 2209
In article <A0************ *****@newsread1 .news.pas.earth link.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
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
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******** *********@newsr ead1.news.pas.e arthlink.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
"Don Sutter" <no@way.com> wrote in message news:<A0******* **********@news read1.news.pas. earthlink.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.c om/groups?threadm= c17ndg%24l3t%24 1%40newsreader. mailgate.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
"R. Rajesh Jeba Anbiah" <ng**********@r ediffmail.com> wrote in message
news:ab******** *************** ***@posting.goo gle.com...
"Don Sutter" <no@way.com> wrote in message news:<A0******* **********@news read1.news.pas. earthlink.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
"Hayden Kirk" <sp**@spam.co m> wrote in message news:<Wr******* **********@news 02.tsnz.net>...
"R. Rajesh Jeba Anbiah" <ng**********@r ediffmail.com> wrote in message
news:ab******** *************** ***@posting.goo gle.com... <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.c om/groups?selm=abc 4d8b8.040213054 7.2f09d2af%40po sting.google.co m>

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
2352
by: Andrea A | last post by:
Hi, i'm developing a website that will have an huge amount of visitors a day --> it will be a contest with 100.000$ of prize. I'm concerning about using a template class (and which one do you suggest) or developing an optimized set of pages without using class nor PEAR package. What do you think about? What will be your action if you'll be me?
4
1935
by: Berislav Lopac | last post by:
Does anyone know of a PHP template engine that uses XML-compliant syntax? I mean something along the line of having <template:variable name="myVar" /> instead of the usual {myVar}. Berislav -- If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are Groucho, Chico, and Harpo, then Usenet is Zeppo.
5
2262
by: Miika Keskinen | last post by:
Hi all I was in need for a simple template engine (like PEAR::IT.php) and didn't find any suitable. Yes, there is many templating engines available but most are far too complex or does implement some additional features in their syntax. So I created following and I'm asking comments - and yes I know there is couple not so pythonistic sides in code. Most of all accessing inner dict B straight. This is however first working version...
8
2523
by: HchC | last post by:
PHP is already a HTML templating laguage, but I am looking for a HTML template engine for users who know nothing about HTML. This template engine should not be too complex, as this is for very basic users only. Some HTML online editor is good, but too complex, it's useful for web builder writting HTML page.
2
9440
by: Laurens | last post by:
Hi, Does anyone know a good template engine for generating text dynamically. (I.e. HTML, SQL statements, code generation, etc.) I'm looking for something similar to Velocity or Freemarker(both Java libraries). Thanks -Laurens
4
1295
by: piotr | last post by:
Hi, I'm looking for a template engine that can give me names of required variables in parse time. Calculation of a value for a specific variable name could be possibly done in specified callback function. For example: <html>
17
3220
by: allen.fowler | last post by:
Hello, Can anyone recommend a simple python template engine for generating HTML that relies only on the Pyhon Core modules? No need for caching, template compilation, etc. Speed is not a major issue. I just need looping and conditionals. Template inheritance would be a
0
995
by: Samuel | last post by:
Hi, Following the masses I was drawn to RoR's website today and I saw the following HTML template in one of the screencasts: ------ <body> <% form_remote_tag :url ={ :action =:search }, :update =:results, :complete =visual_effect(:blind_down, 'image')
14
1571
by: Egbert Teeselink | last post by:
Hi all, The last few months I've worked on making a template engine because the ones out there didn't serve my needs. I guess everybody knows Smarty and has an opinion on it; I like many things about it, but dislike many others. The thing I made is called 'Farty' (sorry, I suck at names) and is in many ways a simpler version of Smarty. It keeps the good (compiling to php files, clean syntax) and fixes the bad (having to learn a new...
0
8162
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8105
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8605
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8246
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8415
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6076
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5532
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4109
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1413
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.