UseBB Community

The official board for UseBB help and discussion

UseBB Community » 2.x Discussion » TemplateLite

TemplateLite

Page: 1

Author Post
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 :D
what are you thinking about, or savant for V2 is definitely planned?
« Last edit by R4iDEN on Thu May 25, 2006 3:25 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. ;)
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
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.
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.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
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.html

savant 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.
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.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
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 (((
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.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
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! :D
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 :P
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
Please vote in the poll: http://www.usebb.net/polls.php?id=29
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: May 2006
Posts: 16
what about all good plain php as a defualt template? it would be fastest for sure ;-)
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.
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.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
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. :P
Developer
Registered: Apr 2004
Posts: 2202
Location: Belgium
Ofcourse, Savant templates are PHP. :)

And that may indeed by an issue.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
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.

Page: 1

UseBB Community » 2.x Discussion » TemplateLite

UseBB Community is powered by UseBB 1 Forum Software