Re: Play nice! Re: Savant/Flexy/Foo template engines

From: Date: Wed, 09 Jun 2004 18:57:23 +0000
Subject: Re: Play nice! Re: Savant/Flexy/Foo template engines
References: 1 2 3 4 5 6 7  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30318@lists.php.net to get a copy of this message
Lukas Smith wrote: [snip]
Anyways here is a novel way of thinking that might get you off of the "its different" attitude: In Flexy you generate Savant style templates. In Savant you write the templates yourself. Flexy: if ! (.php template exists || more recent raw template exists) if ! (raw template exists)
     Kaboom
else
    Compile -> Cache
Assign Finaloutput Savant: if ! (.php template exists) Kaboom Assign Finaloutput As you can see the only difference there really needs to be is that where Savant would explode due to a missing template, flexy would check if there is a template to compile and if yes compile and cache. Ok there is also the "or more recent raw template exists). Making this check optional by proper OO design should be a challenge. For the normal operation there isnt really any difference (aside from that single or that flexy needs).
There is still a difference and that is the (possible) loading of the compiling engine. From what I have gleaned from the lists (correct me if I'm wrong), the compiler is still included if there is no compiling. This is a large bit of code and can slow down a page request. If Flexy only includes the compiler when it needs to compile *and* includes all of the same features (including plugins and such) then, sure, Flexy could possibly be used in a Savant mode without any differences. I'd try to check thses things myself in the code, but I can't get to pear.php.net at the moment.... -- paperCrane <Justin Patrin>

« previous php.pear.dev (#30318) next »