Re: [PEPr] Comment on HTML::Template_Savant

From: Date: Wed, 02 Jun 2004 18:49:02 +0000
Subject: Re: [PEPr] Comment on HTML::Template_Savant
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29922@lists.php.net to get a copy of this message
Hi, Paul Jones wrote:
Having said that, and without deprecating Alan's good work, I think that "ramping down" Flexy to the Savant level is exactly the reverse of how things should be handled. A "Lite" style package should not be the cut-down version of a larger one, the larger one should spring from the common and smaller base. As such, I still think Savant is a great candidate for PEAR as it provides that common, minmalist base from which other systems can be extended.
Alan Knowles responded:
I'm not quite sure you've got the figures right there:
Well, I have been known to be wrong from time to time. :-) And not to nitpick, but I didn't cite any figures. You bring some up here...
- Flexy's core class is 820 (450 without comments) lines long Savant is 1620 (825 without comments) lines.. There may still be stuff in Flexy's core that can be moved out of the main class into other classes, compileAll, the element merger, and a few of the less necessary methods. The bulk of the code in Flexy's core class is really about a) set up the options. b) does the template exist (in any of the source folders) c) doing some tweaking on the object prior to outputting..
... and while I may be mistaken, it looks to me that a missing (d) is "calling the compiler class to compile the template." Based on the most recent relase, not CVS, it appears to me that the compiler class is necessary to the normal operation of Flexy; as such, if we're comparing line counts (which might not be the best way to do this) we should include the compiler class line count as well -- and it looks like Compiler.php also calls a number of sub-classes. Unless I am mistaken due to my ignorance of the subtleties of Flexy, the line count appears to increase dramatically for Flexy when one includes the compiler that is apparently the main strength of Flexy. Please correct me as you see fit, Alan, I'm not up on all of the code. I'm not sure line counts are the best thing to compare on this kind of issue, even if it does turn out that Flexy has more (or less, even). My point is that Flexy has an idea about its normal mode, and Savant has an idea about *its* normal mode; I don't think the two really merge, and I think Flexy expects a bit more from the developer-user than Savant does. But that's just me. -- Paul M. Jones Savant: the simple alternative to Smarty for PHP. http://phpsavant.com/ DB_Table: build RDBMS tables and XHTML forms in one PHP class. http://wiki.ciaweb.net/yawiki/index.php?area=DB_Table Yawiki: a collaborative online documentation system. http://wiki.ciaweb.net/yawiki/index.php?area=Yawiki Yawp: a single-file foundation for PHP applications. http://phpyawp.com/

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