Date: 03/27/01
- Next message: nathan r. hruby: "Re: [phplib] Object instance"
- Previous message: Maxim Derkachev: "Re[2]: [phplib] Object instance"
- Next in thread: Christian Stocker: "Re: [phplib] Compiled templates vs. parsed"
- Reply: Christian Stocker: "Re: [phplib] Compiled templates vs. parsed"
- Reply: Karsten Dambekalns: "Re: [phplib] Compiled templates vs. parsed"
- Reply: Maxim Derkachev: "Re: [phplib] Compiled templates vs. parsed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
I'm using phplib for about 2 years now an I'm wodering about the template
thing. Templates in general are great - since I hate mixing markup with
logic.
PHPlib uses parsed templates. This is very time consuming for bigger sites
with more hits (than a "That is me"-Site), and in my opinion totally
unnecessary.
The layout defined by the templates does not change - so why parse it every
hit?
I think it would be much more effective to compile the templates into mixed
php-code (for runtime), that runs much faster. Smarty does this very well,
but couldn't it be a feauture of PHPlib?
Another approach (the best I think) is to compile the templates directly to
plain HTML and include the html. Well this is a bit tricky, 'caus not only
if the templates change, also if database records change, the templates have
to be recompiled. The time-overhead to check for changes is minimal compared
to parsing and accessing the database for each and every hit. For big sites
this is very cool, since the load on the database is reduced to a minimum.
It would be more than nice to have a such a tpl engine in PHPlib. What do
you think about that? BinaryCloud seems to take this approach in future
versions.
cu, andi
For the record:
Smarty: http://www.phpinsider.com/php/code/Smarty/
Binarycloud: http://www.binarycloud.com
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: nathan r. hruby: "Re: [phplib] Object instance"
- Previous message: Maxim Derkachev: "Re[2]: [phplib] Object instance"
- Next in thread: Christian Stocker: "Re: [phplib] Compiled templates vs. parsed"
- Reply: Christian Stocker: "Re: [phplib] Compiled templates vs. parsed"
- Reply: Karsten Dambekalns: "Re: [phplib] Compiled templates vs. parsed"
- Reply: Maxim Derkachev: "Re: [phplib] Compiled templates vs. parsed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

