Go Back   SitePoint Forums > Forum Index > Program Your Site > PHP
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Aug 16, 2003, 06:14   #1
HarryF
SitePoint Wizard
gold trophysilver trophy
 
Join Date: Nov 2000
Location: Switzerland
Posts: 2,906
Question A Complete List of PHP Template Engines?

Conducting a small experiment. Been wondering "Just how many template engines does PHP have?". My guess is there's probably at least 50 Open Source template engines out there but was hoping for a more precise number. The reason why is get a feel for how many times we've re-invented this wheel.

So if I can beg a momemt of time, please add any template engines you know of to this list. They don't have to be stand alone projects - phpBB for example has it's own template engine so that counts as one. The main thing is identifying unique template engines.

Here's the first few off the top of my head;

1. PHP (yep PHP itself is a template engine)
2. Smarty
3. XSLT - technically XSLT is also a template engine
4. PEAR::HTML_Template_Flexy
5. PEAR::HTML_Template_IT
6. PEAR::HTML_Template_PHPLIB
7. PEAR::HTML_Template_Sigma
8. PEAR::HTML_Template_Xipe
9. patTemplate
10. PHPTAL (port of Zope templates)
11. PHP Savant - reclaiming PHP
12. SimpleT - also reclaiming PHP
13. YATS - Yet Another PHP Templating System
14. phpBB template engine
15. Fast Template
16. Tiny But Strong
17. YAPTER (yet another yet another?)
18. Simple Turtle Template
19. MiniTemplator
20. TagTemplate

Wow - that's already 20...
HarryF is offline   Reply With Quote
Old Aug 16, 2003, 08:42   #2
Dr Livingston
Non-Member
 
Join Date: Jan 2003
Posts: 5,799
21. http://www.ultratemplate.com/main.php

Not a bad project as it stands at the moment although for more features there needs to be more development; although it'd do it's job if all you need is basic non complex functionality ?
Dr Livingston is offline   Reply With Quote
Old Aug 16, 2003, 09:06   #3
Dr Livingston
Non-Member
 
Join Date: Jan 2003
Posts: 5,799
Umm... IMO No. 17 looks like a solid Template Engine to use for general use no ? Just my thoughts though folks...
Dr Livingston is offline   Reply With Quote
Old Aug 16, 2003, 09:08   #4
Selkirk
SitePoint Guru
 
Join Date: Nov 2002
Posts: 848
This will be fun.

Standalone:
22. Template Power
23. Virtual Template (French)
24. vLibTemplate
25. XTemplate
26. Richard Hayes Template class
27. Bugi Template (site is down? hotscripts entry)
28. bTemplate
29. Phemplate
30. Templeet
31. htmltmpl
Selkirk is offline   Reply With Quote
Old Aug 16, 2003, 09:13   #5
Crowe
SitePoint Wizard
 
Crowe's Avatar
 
Join Date: Nov 2001
Location: Huntsville
Posts: 1,515
32. PHPLib
Crowe is offline   Reply With Quote
Old Aug 16, 2003, 10:05   #6
HarryF
SitePoint Wizard
gold trophysilver trophy
 
Join Date: Nov 2000
Location: Switzerland
Posts: 2,906
Quote:
32. PHPLib
Think I have to omit that one as it's now PEAR::HTML_Template_PHPLib unless I'm mistaken. Also the project formerly known as Simple Template (or something like that is now known as PEAR::HTML_Template_Xipe

Couple more...

32. eZ Publish 2.x Templates
33. eZ Publish 3.x Templates - very different to 2.x
HarryF is offline   Reply With Quote
Old Aug 16, 2003, 10:16   #7
tezza
SitePoint Zealot
 
tezza's Avatar
 
Join Date: Aug 2003
Location: Australia
Posts: 153
Thumbs down proprietary systems blow

how about the PHP XSLT extension?
(or the transform capability from libXML2 in the upcoming version of the domdoc extension)

IMO, everything else is a waste of time.

btw. hello everyone. I've just dicovered sitepoint (from phpPatterns.com and I've been reading posts since midnight (now 2:15am :-))
some good meaty discussions here - my kinda place
tezza is offline   Reply With Quote
Old Aug 16, 2003, 10:19   #8
HarryF
SitePoint Wizard
gold trophysilver trophy
 
Join Date: Nov 2000
Location: Switzerland
Posts: 2,906
Quote:
how about the PHP XSLT extension?
Up there at #3 - whether DOM might also be called a template engine is another question.


Some more from the PHP Resource Index

34. TemplatePower
35. Muze Template
36. ETS - Easy Template System
37. AvantTemplate
38. Logic Template - not sure about this one - seems to be about turning PHP into an intepreter
39. varpage (formerly known as ShellPage)
HarryF is offline   Reply With Quote
Old Aug 16, 2003, 10:23   #9
Dr Livingston
Non-Member
 
Join Date: Jan 2003
Posts: 5,799
Welcome to SitePoint Tezza - You'll find this forum will be a life saver at times I know it has helped me many a time.

HarryF - DOM ? Proberly would be better to describe this as a form of templating yes ? Your article on DOM Widget's for example would be a good place to begin.
Dr Livingston is offline   Reply With Quote
Old Aug 16, 2003, 10:30   #10
Jeff Lange
"Of" != "Have"
bronze trophy
 
Jeff Lange's Avatar
 
Join Date: Jan 2003
Location: Calgary, Canada
Posts: 2,060
Template-X is my template engine... I don't have a dedicated page for it.

http://demo.deluxeportal.com/

You can look at it in the Admin Panel. (It's since been updated for Beta 4, but it's still similar)
Jeff Lange is offline   Reply With Quote
Old Aug 16, 2003, 10:30   #11
HarryF
SitePoint Wizard
gold trophysilver trophy
 
Join Date: Nov 2000
Location: Switzerland
Posts: 2,906
Welcome as well Tezza - sorry - was mid train of thought.

Quote:
HarryF - DOM ? Proberly would be better to describe this as a form of templating yes ? Your article on DOM Widget's for example would be a good place to begin.
Now PHP-DOM has support for HTML why not?

40. PHP-DOM extension (HTML support)
HarryF is offline   Reply With Quote
Old Aug 16, 2003, 10:30   #12
anode
Sidewalking
 
anode's Avatar
 
Join Date: Mar 2001
Location: Philadelphia, US
Posts: 2,241
Does phpHTMLLib count, or does it fall under the DOM "exemption"?
anode is offline   Reply With Quote
Old Aug 16, 2003, 10:32   #13
HarryF
SitePoint Wizard
gold trophysilver trophy
 
Join Date: Nov 2000
Location: Switzerland
Posts: 2,906
Quote:
Template-X is my template engine
Good enough for me

41. Template-X
HarryF is offline   Reply With Quote
Old Aug 16, 2003, 10:33   #14
HarryF
SitePoint Wizard
gold trophysilver trophy
 
Join Date: Nov 2000
Location: Switzerland
Posts: 2,906
Quote:
Does phpHTMLLib count, or does it fall under the DOM "exemption"?
For me that falls under using PHP itself as a template engine (right now). Of course the author could invent a simple template syntax to eliminate the use of PHP but describes the API (which might be nice for designers)
HarryF is offline   Reply With Quote
Old Aug 16, 2003, 10:35   #15
tezza
SitePoint Zealot
 
tezza's Avatar
 
Join Date: Aug 2003
Location: Australia
Posts: 153
Quote:
Originally Posted by HarryF
Up there at #3 - whether DOM might also be called a template engine is another question.
I'm not so sure. it's a good question. "Template" implies literal content around which dynamic content can be inserted. but what I tend to do is have a "base"class for my application which uses DOM::append_child and DOM::set_attribute methods to set up a "standard content envelope" for the application (*before* any transformation happens). So I guess I'm incorporating template functionality when I "initialise"a page in my app.

It's not a templating system as such though. As in, it's no a system for implementing templates.

XSLT most definately can be thought of as one though. You literally cannot compile an XSLT template against any XML without using the TEMPLATE directive - even though it is possible to declare an XSLT script without a single literal.
tezza is offline   Reply With Quote
Old Aug 16, 2003, 11:03   #16
HarryF
SitePoint Wizard
gold trophysilver trophy
 
Join Date: Nov 2000
Location: Switzerland
Posts: 2,906
Quote:
I'm not so sure. it's a good question. "Template" implies literal content around which dynamic content can be inserted. but what I tend to do is have a "base"class for my application which uses DOM::append_child and DOM::set_attribute methods to set up a "standard content envelope" for the application (*before* any transformation happens). So I guess I'm incorporating template functionality when I "initialise"a page in my app.
Interesting. Like the definition.

My attempt at this is described here although DOM has to get alot more stable (and have a settled API) before I start using something like that in anger.

Code:
<h1>Powered by <phptag id="PHP" /> and <phptag id="MySQL" /></h1>
The markers are the <phptag/> elements which, via DOM, I manipulate in memory. It might be better done something like this though;

Code:
<h1>Powered by <a id="PHP" /> and <a id="MySQL" /></h1>
Also it's probably a bad idea to perform the transformation in memory per page request. Better to parse the "template" with DOM then "compile" into a PHP script containing literal HTML plus PHP code. Something like;

PHP Code:

<h1>Powered by <?php

$PHP
= & new Tag('a',$dataSource);
echo
$php->render();
?> and <?php
$MySQL
= & new Tag('a',$dataSource);
$MySQL->render();
?></h1>
Selkirk's been enlightening me: the Template View - Martin Fowler, in Patterns for Enterprise Application Architecture, describes it as;

Quote:
Template View: renders information into HTML by embedding markers in an HTML page
HarryF is offline   Reply With Quote
Old Aug 16, 2003, 12:46   #17
flaimo
SitePoint Member
 
Join Date: Aug 2002
Location: Linz, Austria
Posts: 17
i really like phptal, because it's not one of those {} engines and it has nice wrappers for using xour own i18n and cache classes...
flaimo is offline   Reply With Quote
Old Aug 16, 2003, 13:56   #18
Dr Livingston
Non-Member
 
Join Date: Jan 2003
Posts: 5,799
[Off Topic]

Looking over the manual at www.php.net on the DOM I noticed that there are a few functions for XSL stylesheets ?

Umm... In the past I've used the Sablotron extension and a class and it worked well enough though I found very few Sablotron web hosts and there is the question of benchmarking.

Now I am pondering on the idea that since nearly all web hosts have the DOMXML extension by default has anyone managed to use XSL-T with the DOM extension to the point of production level ?

It'd be an interesting concept to use XSL via the DOM for templating as I see it maybe...

Any thoughts on this folks ?
Dr Livingston is offline   Reply With Quote
Old Aug 16, 2003, 14:26   #19
anode
Sidewalking
 
anode's Avatar
 
Join Date: Mar 2001
Location: Philadelphia, US
Posts: 2,241
Quote:
Originally Posted by Dr Livingston
[Off Topic]

Looking over the manual at www.php.net on the DOM I noticed that there are a few functions for XSL stylesheets ?

Umm... In the past I've used the Sablotron extension and a class and it worked well enough though I found very few Sablotron web hosts and there is the question of benchmarking.

Now I am pondering on the idea that since nearly all web hosts have the DOMXML extension by default has anyone managed to use XSL-T with the DOM extension to the point of production level ?

It'd be an interesting concept to use XSL via the DOM for templating as I see it maybe...

Any thoughts on this folks ?
Sablotron and Expat are going away in PHP5, and the library that does DOM XML now will cover SAX and XSLT parsing. You shlould read Harry's PHP article.
anode is offline   Reply With Quote
Old Aug 16, 2003, 14:42   #20
HarryF
SitePoint Wizard
gold trophysilver trophy
 
Join Date: Nov 2000
Location: Switzerland
Posts: 2,906
Some more...

42. KTemplate (former Apolda Template)
43. EZ Template
44. 4Arrow Template Compiler
45. DTE
46. Enzyme Template (part of a mini framework)
47. dutchtpl
48. Xaraya - implements it's own template engine
49. Bleetz
50. ASAPlate
51. ecTemplate
52. Freetemplate
53. FT
54. ModelIxe - site's down right now but this one is interesting - it's the guy that's developing phpEdit and the Freshmeat description makes it sound a little ASP.NET like.

Phew - that's over 50. Need a break.
HarryF is offline   Reply With Quote
Old Aug 16, 2003, 15:15   #21
Dr Livingston
Non-Member
 
Join Date: Jan 2003
Posts: 5,799
Anode - Yes, I've read Harry's article I know Sablotron is redundant in PHP5 and since this new PHP version will have for the most part all the required XML (and related technology) built in this is all great etc.

I was though referering to PHP4.2.x and above ? Should have made that more clearly now, so sorry about that

But could a templating engine be done though that will actually work okay on a production site... ?
Dr Livingston is offline   Reply With Quote
Old Aug 16, 2003, 15:21   #22
HarryF
SitePoint Wizard
gold trophysilver trophy
 
Join Date: Nov 2000
Location: Switzerland
Posts: 2,906
Can't help it (it's addictive once you get started)

55. FastTemplate Clone - drop in replacement for FastTemplate.
56. PHP-Service
57. PHPTempt
58. Quick Template
59. Sledgehammer
60. Server Side Template Parser
61. Vanilla Object Oriented Templates
62. vBulletin - has it's own template langauge

There's at least another ten over at phpclasses not in the list yet...
HarryF is offline   Reply With Quote
Old Aug 16, 2003, 17:15   #23
suzkaw
SitePoint Addict
 
suzkaw's Avatar
 
Join Date: Apr 2002
Location: North Carolina
Posts: 348
Makes you wonder what would happen if they were all integrated into one. Maybe someday life will be that simple!
suzkaw is offline   Reply With Quote
Old Aug 16, 2003, 17:56   #24
Jeff Lange
"Of" != "Have"
bronze trophy
 
Jeff Lange's Avatar
 
Join Date: Jan 2003
Location: Calgary, Canada
Posts: 2,060
I don't think that's the key. I think the key is having a template engine that does what a specific proect requires it to.
Jeff Lange is offline   Reply With Quote
Old Aug 17, 2003, 00:12   #25
Amit
This is all Mumbo Jumbo
 
Amit's Avatar
 
Join Date: Oct 2001
Location: New Delhi, India
Posts: 284
I have my own web template phpObjects.WebTemplate though haven't created a dedicated page though ...
Amit is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 07:30.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved