Re: Re: New thread - Template base class design
| From: | Paul M Jones | Date: | Fri, 11 Jun 2004 19:23:58 +0000 |
| Subject: | Re: Re: New thread - Template base class design | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30524@lists.php.net to get a copy of this message | ||
On Jun 11, 2004, at 1:26 PM, Philippe Jausions wrote:
Although the "open" word may be out of place when the method actually accepts an object... Would "useTemplate()" be better suited???Yes, "open()" has been bothering me to. "use()" is OK ... select() -- has an SQL sound to it. begin() or start() compile() -- Since it's where the find-and-compile stage happens; I don't like that since the base usage is *not* to compile, but it might be OK. find() -- see compile() There's got to be a "right word" for that... Incidentally, what kind of object do you think would go in there?
2. Base template should/could/would(?) provide an "easy" member assignment approach to passing data, though, I got to say that I have a gut feeling that it's not a good idea...Not sure what you mean here.
3. Work under PHP4 and PHP5, with added bonus for possibly PHP5 features (but not breaking PHP4). i.e. __get() and __set() are available in PHP4 but "experimental"...Agreed.
4. Be able to accomodate several template philosophies: declarative (i.e. Flexy, Savant...) and imperative (ie. IT, Sigma...), other (XML...)?Agreed, c.f. the compiler "provider" Alan talks about.
5. To be extendable / reusable for non-text generating package (i.e. images, PDF, Flash... whatever...)Also agreed, I don't think there's anything in it that limits it to a specific text or binary type.
6. Find a way for easy QuickForm integration.Well, that'll be an issue. :-)
7. Be simple and fast.Agreed, but I think both will depend on the "providers" assigned to it. I think you'll be able to have the range of simple to complex, and fast to slow, as needed.
Did anyone provide a Wiki for that? I can't find the thread...No wiki that I know of, I was using one to display example code, but Alan's has been stripped down enough that I think we can work with it instead.
Did I get everything right?Think so. :-) -- 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/