| Author |
Post |
|
|
#1 Thu May 25, 2006 3:22 am
|
|
Member
Registered: Apr 2006
Posts: 20
Location: Germany
|
Hi, have found this cool looking template engine today. http://templatelite.sourceforge.net/perhaps better than savant ? great benchmark under PHP 5.1.1 and a mutch more better understanding docu as savant  what are you thinking about, or savant for V2 is definitely planned? « Last edit by R4iDEN on Thu May 25, 2006 3:25 am. »
|
|
|
#2 Thu May 25, 2006 10:55 am
|
|
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
|
The reason for using Savant is because it uses PHP and thus doesn't need to be compiled (very fast). After all everybody knows PHP so templating won't that hard. However, as you can see in the changes list I'm planning to make a template parser abstraction in a later 2.x release, so you can use other template engines too, such as this one, or Smarty, etc. 
|
|
|
#3 Thu May 25, 2006 12:42 pm
|
|
Member
Registered: May 2006
Posts: 16
|
inmho, the best template engine is plain php, as long as you can keep template files clean. it's great to hear that one will be able to use his own engine.
|
|
|
#4 Thu May 25, 2006 12:48 pm
|
|
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
|
Hehe, well that's in fact wat Savant is, but it has an OO interface  The possibility of using different engines comes from Drupal, btw.
|
|
|
#5 Thu May 25, 2006 7:27 pm
|
|
Member
Registered: Apr 2006
Posts: 20
Location: Germany
|
sopel wrote inmho, the best template engine is plain php
right, says all. but its not true. with savant you have a mixed file with xhtml and php. thats not the programm logic of a template system. with savant you have more bytes to parse as realy needed. small simple example: <?php echo strtolower($var); ?> with templateLite {$var|lower}thats it - and now this site is compiled too  check the variable modifier: http://templatelite.sourceforge.net/docs/language.modifiers.htmlsavant is ok, but im not a friend of it. i dont like php code in template files. that is not the purpose of a template system.
|
|
|
#6 Thu May 25, 2006 8:20 pm
|
|
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
|
Quote with savant you have more bytes to parse as realy needed.
That's true, but Savant doesn't need compilation and caching. Savant was chosen because of this, but I can always return to that decision. Maybe it would be better to have the template parser abstraction directly built in into 2.0.0, but the question remains which engine to use for the default template.
|
|
|
#7 Thu May 25, 2006 8:58 pm
|
|
Member
Registered: Aug 2005
Posts: 15
Location: Ukraine
|
can i say few words on Template_Lite? okay... it is sucks... why? because it is some updated Smarty-Lite template engine and nothing more... i think, if you want to use template engine, like Smarty, you may prefer Smarty... all anothers are only copies of it... _______________ Sorry for my bad english (((
|
|
|
#8 Thu May 25, 2006 9:28 pm
|
|
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
|
Well, forks of projects may happen, and if TemplateLite is really much faster than Smarty it may be worth the consideration.
|
|
|
#9 Fri May 26, 2006 10:10 am
|
|
Member
Registered: Apr 2006
Posts: 20
Location: Germany
|
Loki1zI wrote can i say few words on Template_Lite? okay... it is sucks... why? because it is some updated Smarty-Lite template engine and nothing more... i think, if you want to use template engine, like Smarty, you may prefer Smarty... all anothers are only copies of it...
why templateLite, sucks? small, faster, better!  Smarty sucks, to big, to mutch programmcode. and its no secret, templateLite is SmartyLite. however, i use CodeIgniter Framework. dont need an external template system 
|
|
|
#10 Fri May 26, 2006 12:09 pm
|
|
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
|
|
|
|
#11 Fri May 26, 2006 12:10 pm
|
|
Member
Registered: May 2006
Posts: 16
|
what about all good plain php as a defualt template? it would be fastest for sure ;-)
|
|
|
#12 Sat May 27, 2006 2:56 pm
|
|
Member
Registered: May 2006
Posts: 29
|
Savant looks pretty good to me. I personally use either PHP or my own templating class, depending on the project.
If you chose Savant I think that would be a wise idea.
|
|
|
#13 Sat May 27, 2006 9:21 pm
|
|
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
|
I guess I'll have to test what is the fastest, a light template syntax using engine or Savant. Savant will be very fast, but I can image it can be a little bit harder to use for some people. XSL(T) was also discussed on a different forum, but in my opinion it's too early to start using XSL. This is certainly an idea for an implementation on the template parser abstraction or for (who knows) v3.0 (in PHP6?). So far the poll is showing Smarty alike systems more popular than Savant. CSS-only styling is ofcourse not an option.
|
|
|
#14 Sun May 28, 2006 11:35 pm
|
|
Member
Registered: May 2006
Posts: 29
|
Just wondering, can you use PHP in Savant? If so, it might be a security issue with people distributing skins. They could put malicious PHP code in them. I think I'll post about this at OneCommune. 
|
|
|
#15 Mon May 29, 2006 11:14 am
|
|
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
|
Ofcourse, Savant templates are PHP.  And that may indeed by an issue.
|
|
|
#16 Mon May 29, 2006 2:11 pm
|
|
Member
Registered: May 2006
Posts: 29
|
It was a bit of a stupid question. I thought that maybe they would limit what could or could not be used.
|