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

From: Date: Thu, 10 Jun 2004 23:45:43 +0000
Subject: Re: Play nice! Re: Savant/Flexy/Foo template engines
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30451@lists.php.net to get a copy of this message
On Jun 10, 2004, at 6:29 PM, Joshua Eichorn wrote:
Paul M Jones wrote:
On Jun 10, 2004, at 3:50 PM, Joshua Eichorn wrote:
I've been crazy busy at work for the last couple days so i haven't had a time to review the code but i would point out that an interface and extension isn't the only solution.
Fair enough; when you get a chance, take a look at both sets -- they seem to follow distinctly different paths, even though we're using the same reference document (the Jausions interface model). What would other solutions be, besides interface and extension? Maybe I'm too much inside the box, I thought those were two principal ideas in OOP-like code.
There is more to good design then Simple OOP. The reset is generally called design patterns read(http://phppatterns.com/index.php/article/archive/1/) for examples in php.
I am not a design pattern guru, obviously. Which of those patterns is Alan using in his implementation of the Jausions interface? Perhaps he can say later; I think it's still dark in HK right now. Incidentally, the very first essay is a warning about over-using patterns, so a particular pattern or set of patterns may not be best in this case (although not being a pattern-man I can't say with authority). Harry Fuecks, who runs phpPatterns, is certain to be a better judge.
In the template case using runtime agregation techniques might be a much better solution then direct inheiritance that way what you needed can be decided on use instead of picking the class at th eright level to get what you want. Inheiritance is powerful but inflexible, you'll find that much of Alans code is based on the concept of short inheiritance trees while using other methods to gain even greater flexibility.
I think I have a shorter inheritance tree in the example code I posted on the Savant wiki, but I might be misunderstanding your meaning.
The one problem with this is it can make your api harder to document, but if done correctly it should be easier to use. Hopefulyl i'll have time and energy to review the code tonight, but i wouldn't bet on that happening since i've spent all day in a reporting meeting, hacking out prototypes for the business users.
Not at all; have a beer, relax. In 20 years this probably won't matter anyway. :-) -- 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: your collaborative online documentation system. http://yawiki.com/ Yawp: a single-file foundation for PHP applications. http://phpyawp.com/

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